MCPcopy Create free account
hub / github.com/docker/compose / TestMain

Function TestMain

cmd/compose/hooks_test.go:41–45  ·  view source on GitHub ↗

TestMain stubs the Docker Desktop feature-flag check and the project loader so handleHook tests don't make a live engine call or read a compose file from the test runner's working directory. Individual tests override either stub with t.Cleanup to restore.

(m *testing.M)

Source from the content-addressed store, hash-verified

39// compose file from the test runner's working directory. Individual tests
40// override either stub with t.Cleanup to restore.
41func TestMain(m *testing.M) {
42 logsTabEnabled = func(context.Context) bool { return true }
43 resolveAppID = func(context.Context, map[string]string) string { return "" }
44 os.Exit(m.Run())
45}
46
47func TestHandleHook_NoArgs(t *testing.T) {
48 var buf bytes.Buffer

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected