MCPcopy Create free account
hub / github.com/docker/go-plugins-helpers / TestMain

Function TestMain

network/api_test.go:123–137  ·  view source on GitHub ↗
(m *testing.M)

Source from the content-addressed store, hash-verified

121}
122
123func TestMain(m *testing.M) {
124 d := &TestDriver{}
125 h1 := NewHandler(d)
126 go h1.ServeTCP("test", "localhost:32234", "", nil)
127
128 e := &ErrDriver{}
129 h2 := NewHandler(e)
130 go h2.ServeTCP("err", "localhost:32567", "", nil)
131
132 // Test that the ServeTCP is ready for use.
133 callURL("http://localhost:32234/Plugin.Activate")
134 callURL("http://localhost:32567/Plugin.Activate")
135
136 os.Exit(m.Run())
137}
138
139func TestActivate(t *testing.T) {
140 response, err := http.Get("http://localhost:32234/Plugin.Activate")

Callers

nothing calls this directly

Calls 3

ServeTCPMethod · 0.95
NewHandlerFunction · 0.70
callURLFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…