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

Function createTestTopic

lib/gcppubsub/client_test.go:132–142  ·  view source on GitHub ↗
(t *testing.T, topicID string)

Source from the content-addressed store, hash-verified

130}
131
132func createTestTopic(t *testing.T, topicID string) {
133 ctx := context.Background()
134 // nolint:exhaustruct // WONTFIX: external struct
135 topicpb := &pubsubpb.Topic{
136 Name: fmt.Sprintf("projects/%s/topics/%s", testProjectID, topicID),
137 }
138 _, err := pubsubClient.client.TopicAdminClient.CreateTopic(ctx, topicpb)
139 if err != nil {
140 t.Fatalf("failed to create topic: %v", err)
141 }
142}
143
144func createTestSubscription(t *testing.T, topicID, subID string, seconds int32) {
145 ctx := context.Background()

Callers 2

TestPublishAndSubscribeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected