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

Function terminatePubSubContainer

lib/gcppubsub/client_test.go:120–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118}
119
120func terminatePubSubContainer() error {
121 if unsetErr := os.Unsetenv("PUBSUB_EMULATOR_HOST"); unsetErr != nil {
122 return fmt.Errorf("failed to unset env. %s", unsetErr.Error())
123 }
124 pubsubClient.Close()
125 if err := pubsubContainer.Terminate(context.Background()); err != nil {
126 return fmt.Errorf("failed to terminate datastore. %s", err.Error())
127 }
128
129 return nil
130}
131
132func createTestTopic(t *testing.T, topicID string) {
133 ctx := context.Background()

Callers 1

TestMainFunction · 0.85

Calls 2

ErrorMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected