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)
| 39 | // compose file from the test runner's working directory. Individual tests |
| 40 | // override either stub with t.Cleanup to restore. |
| 41 | func 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 | |
| 47 | func TestHandleHook_NoArgs(t *testing.T) { |
| 48 | var buf bytes.Buffer |
nothing calls this directly
no outgoing calls
no test coverage detected