Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Service Bus test environment #45969

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,28 @@ public class ServiceBusTestEnvironment : TestEnvironment
/// <summary>The active Service Bus namespace for this test run.</summary>
private ServiceBusConnectionStringProperties ParsedConnectionString => ServiceBusConnectionStringProperties.Parse(ServiceBusConnectionString);

/// <summary>
/// The connection string for the premium Service Bus namespace instance to be used for
/// Live tests.
/// </summary>
///
/// <value>The connection string will be determined by creating an ephemeral Service Bus namespace for the test execution.</value>
///
public string ServiceBusPremiumNamespaceConnectionString => GetRecordedVariable(
"SERVICEBUS_PREMIUM_NAMESPACE_CONNECTION_STRING",
options => options.HasSecretConnectionStringParameter("SharedAccessKey", SanitizedValue.Base64));

/// <summary>
/// The connection string for the secondary Service Bus namespace instance to be used for
/// Live tests.
/// </summary>
///
/// <value>The connection string will be determined by creating an ephemeral Service Bus namespace for the test execution.</value>
///
public string ServiceBusSecondaryNamespaceConnectionString => GetRecordedVariable(
"SERVICEBUS_SECONDARY_NAMESPACE_CONNECTION_STRING",
options => options.HasSecretConnectionStringParameter("SharedAccessKey", SanitizedValue.Base64));

/// <summary>
/// The connection string for the Service Bus namespace instance to be used for
/// Live tests.
Expand Down
2 changes: 2 additions & 0 deletions sdk/servicebus/ci.functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ trigger:
- sdk/servicebus/service.projects
- sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus
- sdk/servicebus/ci.functions.yml
- sdk/servicebus/Azure.Messaging.ServiceBus/tests/Infrastructure
- sdk/servicebus/test-resources.json

pr:
branches:
Expand Down
8 changes: 8 additions & 0 deletions sdk/servicebus/test-resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,18 @@
"type": "string",
"value": "[listkeys(variables('authRuleResourceId'), variables('sbVersion')).primaryConnectionString]"
},
"SERVICEBUS_SECONDARY_NAMESPACE_CONNECTION_STRING": {
"type": "string",
"value": "[listkeys(variables('authRuleSecondaryResourceId'), variables('sbVersion')).primaryConnectionString]"
},
"SERVICEBUS_SECONDARY_FULLY_QUALIFIED_NAMESPACE": {
"type": "string",
"value": "[reference(resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusSecondaryNamespace'))).serviceBusEndpoint]"
},
"SERVICEBUS_PREMIUM_NAMESPACE_CONNECTION_STRING": {
"type": "string",
"value": "[listkeys(variables('authRulePremiumResourceId'), variables('sbVersion')).primaryConnectionString]"
},
"SERVICEBUS_PREMIUM_FULLY_QUALIFIED_NAMESPACE": {
"type": "string",
"value": "[reference(resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBusPremiumNamespace'))).serviceBusEndpoint]"
Expand Down