MCPcopy Index your code
hub / github.com/docker/docker-agent / TestServer_ListSessions

Function TestServer_ListSessions

pkg/server/server_test.go:61–73  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

59}
60
61func 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
75func prepareAgentsDir(t *testing.T, testFiles ...string) string {
76 t.Helper()

Callers

nothing calls this directly

Calls 5

startServerFunction · 0.85
prepareAgentsDirFunction · 0.85
httpGETFunction · 0.85
unmarshalFunction · 0.85
ContextMethod · 0.80

Tested by

no test coverage detected