(t *testing.T, topicID, subID string, seconds int32)
| 142 | } |
| 143 | |
| 144 | func createTestSubscription(t *testing.T, topicID, subID string, seconds int32) { |
| 145 | ctx := context.Background() |
| 146 | topicName := fmt.Sprintf("projects/%s/topics/%s", testProjectID, topicID) |
| 147 | // nolint:exhaustruct // WONTFIX: external struct |
| 148 | subpb := &pubsubpb.Subscription{ |
| 149 | Name: fmt.Sprintf("projects/%s/subscriptions/%s", testProjectID, subID), |
| 150 | Topic: topicName, |
| 151 | AckDeadlineSeconds: seconds, |
| 152 | } |
| 153 | _, err := pubsubClient.client.SubscriptionAdminClient.CreateSubscription(ctx, subpb) |
| 154 | if err != nil { |
| 155 | t.Fatalf("failed to create subscription: %v", err) |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | type handlerDetails struct { |
| 160 | id string |
no test coverage detected