Skip to content

Commit 9d9f701

Browse files
authored
fix the broken tests in eventhubs (Azure#31930)
1 parent ac9618e commit 9d9f701

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Helpers/EventHubTestBase.cs

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using Azure.ResourceManager.EventHubs.Models;
1212
using Azure.Core;
1313
using System.Security.Cryptography;
14+
using Azure.ResourceManager.ManagedServiceIdentities;
1415

1516
namespace Azure.ResourceManager.EventHubs.Tests.Helpers
1617
{
@@ -42,7 +43,13 @@ public EventHubTestBase(bool isAsync, RecordedTestMode? mode = default) : base(i
4243
[SetUp]
4344
public async Task CreateCommonClient()
4445
{
45-
Client = GetArmClient();
46+
// Currently our pipeline will run this test project with project reference
47+
// And we jsut upgraded the version of ManagedServiceIdentities, therefore the related tests will fail
48+
// Use the version override as a work around because we lack the test resource now.
49+
ArmClientOptions options = new ArmClientOptions();
50+
options.SetApiVersion(UserAssignedIdentityResource.ResourceType, "2018-11-30");
51+
52+
Client = GetArmClient(options);
4653
DefaultSubscription = await Client.GetDefaultSubscriptionAsync();
4754
}
4855
public async Task<ResourceGroupResource> CreateResourceGroupAsync()

0 commit comments

Comments
 (0)