(t *testing.T)
| 59 | } |
| 60 | |
| 61 | func TestServer_ListSessions(t *testing.T) { |
| 62 | t.Parallel() |
| 63 | |
| 64 | ctx := t.Context() |
| 65 | lnPath := startServer(t, ctx, prepareAgentsDir(t, "pirate.yaml")) |
| 66 | |
| 67 | buf := httpGET(t, ctx, lnPath, "/api/sessions") |
| 68 | |
| 69 | var sessions []api.SessionsResponse |
| 70 | unmarshal(t, buf, &sessions) |
| 71 | |
| 72 | assert.Empty(t, sessions) |
| 73 | } |
| 74 | |
| 75 | func prepareAgentsDir(t *testing.T, testFiles ...string) string { |
| 76 | t.Helper() |
nothing calls this directly
no test coverage detected