Skip to content

Commit bbea99c

Browse files
cy-yunamanda-tarafa
authored andcommitted
feat(PubSub): Add methods to generate random ingestion params for samples
1 parent 69c0c6c commit bbea99c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

pubsub/api/Pubsub.Samples.Tests/PubsubFixture.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,22 @@ public List<Schema> ListSchemaRevisions(string schemaId)
261261
var randomName = RandomName();
262262
return ($"test{caller}StreamArn{randomName}", $"test{caller}ConsumerArn{randomName}", $"test{caller}AwsRoleArn{randomName}", $"test{caller}GcpServiceAccount{randomName}");
263263
}
264+
265+
public (string clusterArn, string mskTopic, string awsRoleArn, string gcpServiceAccount) RandomAwsMskIngestionParams([CallerMemberName] string caller = null)
266+
{
267+
var randomName = RandomName();
268+
return ($"test{caller}ClusterArn{randomName}", $"test{caller}MskTopic{randomName}", $"test{caller}AwsRoleArn{randomName}", $"test{caller}GcpServiceAccount{randomName}");
269+
}
270+
271+
public (string bootstrapServer, string clusterId, string confluentTopic, string identityPoolId, string gcpServiceAccount) RandomConfluentCloudIngestionParams([CallerMemberName] string caller = null)
272+
{
273+
var randomName = RandomName();
274+
return ($"test{caller}BootstrapServer{randomName}", $"test{caller}ClusterId{randomName}", $"test{caller}ConfluentTopic{randomName}", $"test{caller}IdentityPoolId{randomName}", $"test{caller}GcpServiceAccount{randomName}");
275+
}
276+
277+
public (string resourceGroup, string nameSpace, string eventHub, string clientId, string tenantId, string subscriptionId, string gcpServiceAccount) RandomAzureEventHubsIngestionParams([CallerMemberName] string caller = null)
278+
{
279+
var randomName = RandomName();
280+
return ($"test{caller}ResourceGroup{randomName}", $"test{caller}Namespace{randomName}", $"test{caller}EventHub{randomName}", $"test{caller}ClientId{randomName}", $"test{caller}TenantId{randomName}", $"test{caller}SubscriptionId{randomName}", $"test{caller}GcpServiceAccount{randomName}");
281+
}
264282
}

0 commit comments

Comments
 (0)