fleetd #743: pin GET /agents' tab-label merge with a positive test
This commit is contained in:
@@ -223,6 +223,19 @@ class FleetAppTest {
|
||||
assertTrue(body.has("detail"), res.body());
|
||||
}
|
||||
|
||||
@Test
|
||||
void agentsReportsTheAgentsTabLabel() throws Exception {
|
||||
FakeHerdr herdr = new FakeHerdr().withTab("w2", "w2:t7", "trinotes");
|
||||
int port = start(herdr, "http://gx00.gw:8000", Set.of("gx00.gw"));
|
||||
|
||||
HttpResponse<String> res = req(port, "GET", "/agents");
|
||||
assertEquals(200, res.statusCode(), res.body());
|
||||
JsonNode agents = mapper.readTree(res.body()).get("agents");
|
||||
assertEquals(1, agents.size());
|
||||
assertEquals("sess-1111", agents.get(0).get("sessionId").asText());
|
||||
assertEquals("trinotes", agents.get(0).get("label").asText());
|
||||
}
|
||||
|
||||
/**
|
||||
* The tab-label scan ({@code workspace.list}/{@code tab.list}) is decoration on top of
|
||||
* {@code workers.list()}'s own agent roster, so its failure must not cost that roster: a row
|
||||
|
||||
Reference in New Issue
Block a user