MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / TestMain

Function TestMain

lib/gcppubsub/client_test.go:43–56  ·  view source on GitHub ↗
(m *testing.M)

Source from the content-addressed store, hash-verified

41const testProjectID = "local"
42
43func TestMain(m *testing.M) {
44 err := createPubSubContainer()
45 if err != nil {
46 fmt.Printf("failed to create container. error: %s", err.Error())
47 os.Exit(1)
48 }
49 code := m.Run()
50 err = terminatePubSubContainer()
51 if err != nil {
52 fmt.Printf("Warning: failed to terminate container. error: %s", err.Error())
53 os.Exit(1)
54 }
55 os.Exit(code)
56}
57
58// nolint:exhaustruct // WONTFIX: external struct
59func createPubSubContainer() error {

Callers

nothing calls this directly

Calls 4

createPubSubContainerFunction · 0.85
terminatePubSubContainerFunction · 0.85
RunMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected