@@ -60,10 +60,12 @@ public class AdminIT {
6060 "confluent-cloud-ingestion-topic-" + _suffix ;
6161 private static final String azureEventHubsIngestionTopicId =
6262 "azure-event-hubs-ingestion-topic-" + _suffix ;
63+ private static final String smtTopicId = "smt-topic-" + _suffix ;
6364 private static final String pullSubscriptionId = "iam-pull-subscription-" + _suffix ;
6465 private static final String pushSubscriptionId = "iam-push-subscription-" + _suffix ;
6566 private static final String orderedSubscriptionId = "iam-ordered-subscription-" + _suffix ;
6667 private static final String filteredSubscriptionId = "iam-filtered-subscription-" + _suffix ;
68+ private static final String smtSubscriptionId = "smt-subscription-" + _suffix ;
6769 private static final String exactlyOnceSubscriptionId =
6870 "iam-exactly-once-subscription-" + _suffix ;
6971 private static final String pushEndpoint = "https://my-test-project.appspot.com/push" ;
@@ -118,6 +120,8 @@ public class AdminIT {
118120 TopicName .of (projectId , confluentCloudIngestionTopicId );
119121 private static final TopicName azureEventHubsIngestionTopicName =
120122 TopicName .of (projectId , azureEventHubsIngestionTopicId );
123+ private static final TopicName smtTopicName =
124+ TopicName .of (projectId , smtTopicId );
121125 private static final SubscriptionName pullSubscriptionName =
122126 SubscriptionName .of (projectId , pullSubscriptionId );
123127 private static final SubscriptionName pushSubscriptionName =
@@ -128,6 +132,8 @@ public class AdminIT {
128132 SubscriptionName .of (projectId , filteredSubscriptionId );
129133 private static final SubscriptionName exactlyOnceSubscriptionName =
130134 SubscriptionName .of (projectId , exactlyOnceSubscriptionId );
135+ private static final SubscriptionName smtSubscriptionName =
136+ SubscriptionName .of (projectId , smtSubscriptionId );
131137
132138 private static void requireEnvVar (String varName ) {
133139 assertNotNull (
@@ -456,5 +462,23 @@ public void testAdmin() throws Exception {
456462 // Test delete Azure Event Hubs ingestion topic.
457463 DeleteTopicExample .deleteTopicExample (projectId , azureEventHubsIngestionTopicId );
458464 assertThat (bout .toString ()).contains ("Deleted topic." );
465+
466+ bout .reset ();
467+ // Test create topic with an SMT.
468+ CreateTopicWithSmtExample .createTopicWithSmtExample (
469+ projectId , smtTopicId );
470+ assertThat (bout .toString ())
471+ .contains ("Created topic with SMT: " + smtTopicName .toString ());
472+
473+ bout .reset ();
474+ // Test create topic with an SMT.
475+ CreateSubscriptionWithSmtExample .createSubscriptionWithSmtExample (
476+ projectId , smtTopicId , smtSubscriptionId );
477+ assertThat (bout .toString ())
478+ .contains ("Created subscription with SMT" );
479+ assertThat (bout .toString ()).contains (smtSubscriptionName .toString ());
480+ assertThat (bout .toString ()).contains ("redactSSN" );
481+ DeleteSubscriptionExample .deleteSubscriptionExample (projectId , smtSubscriptionId );
482+ DeleteTopicExample .deleteTopicExample (projectId , smtTopicId );
459483 }
460484}
0 commit comments