@@ -376,6 +376,65 @@ func TestCreateTopicWithSMT(t *testing.T) {
376376 })
377377}
378378
379+ func TestTopicAmazonMSKIngestion (t * testing.T ) {
380+ tc := testutil .SystemTest (t )
381+ buf := new (bytes.Buffer )
382+
383+ srv := pstest .NewServer ()
384+ t .Setenv ("PUBSUB_EMULATOR_HOST" , srv .Addr )
385+
386+ clusterARN := "cluster-arn"
387+ mskTopic := "msk-topic"
388+ awsRoleARN := "aws-role-arn"
389+ gcpSA := "gcp-service-account"
390+
391+ if err := createTopicWithAWSMSKIngestion (buf , tc .ProjectID , topicID , clusterARN , mskTopic , awsRoleARN , gcpSA ); err != nil {
392+ t .Fatalf ("failed to create a topic with AWS MSK ingestion: %v" , err )
393+ }
394+ }
395+
396+ func TestTopicAzureEventHubsIngestion (t * testing.T ) {
397+ tc := testutil .SystemTest (t )
398+ buf := new (bytes.Buffer )
399+
400+ srv := pstest .NewServer ()
401+ t .Setenv ("PUBSUB_EMULATOR_HOST" , srv .Addr )
402+
403+ resourceGroup := "resource-group"
404+ namespace := "namespace"
405+ eventHub := "event-hub"
406+ clientID := "client-id"
407+ tenantID := "tenant-id"
408+ subID := "subscription-id"
409+ gcpSA := "gcp-service-account"
410+
411+ err := createTopicWithAzureEventHubsIngestion (buf , tc .ProjectID , topicID , resourceGroup ,
412+ namespace , eventHub , clientID , tenantID , subID , gcpSA )
413+ if err != nil {
414+ t .Fatalf ("failed to create a topic with event hubs ingestion: %v" , err )
415+ }
416+ }
417+
418+ func TestTopicConfluentCloudIngestion (t * testing.T ) {
419+ tc := testutil .SystemTest (t )
420+ buf := new (bytes.Buffer )
421+
422+ srv := pstest .NewServer ()
423+ t .Setenv ("PUBSUB_EMULATOR_HOST" , srv .Addr )
424+
425+ bootstrapServer := "bootstrap-server"
426+ clusterID := "cluster-id"
427+ confluentTopic := "confluent-topic"
428+ poolID := "identity-pool-id"
429+ gcpSA := "gcp-service-account"
430+
431+ err := createTopicWithConfluentCloudIngestion (buf , tc .ProjectID , topicID ,
432+ bootstrapServer , clusterID , confluentTopic , poolID , gcpSA )
433+ if err != nil {
434+ t .Fatalf ("failed to create a topic with confluent cloud ingestion: %v" , err )
435+ }
436+ }
437+
379438func createTopic (ctx context.Context , client * pubsub.Client , topicName string ) error {
380439 _ , err := client .TopicAdminClient .CreateTopic (ctx , & pubsubpb.Topic {
381440 Name : topicName ,
0 commit comments