(m *testing.M)
| 41 | const testProjectID = "local" |
| 42 | |
| 43 | func 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 |
| 59 | func createPubSubContainer() error { |
nothing calls this directly
no test coverage detected