Skip to content

Commit 56f2c96

Browse files
authored
fix test namespace (Azure#23755)
fix wait for completion in base test class add bastion host create test
1 parent ed1a5ba commit 56f2c96

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+175458
-44
lines changed

common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ protected void CleanupResourceGroups()
105105
try
106106
{
107107
var sub = _cleanupClient.GetSubscriptions().GetIfExists(TestEnvironment.SubscriptionId);
108-
sub.Value?.GetResourceGroups().Get(resourceGroup).Value.Delete();
108+
sub.Value?.GetResourceGroups().Get(resourceGroup).Value.Delete(waitForCompletion: false);
109109
}
110110
catch (RequestFailedException e) when (e.Status == 404)
111111
{
@@ -117,7 +117,7 @@ protected void CleanupResourceGroups()
117117
{
118118
try
119119
{
120-
_cleanupClient.GetManagementGroup(mgmtGroupId).Delete();
120+
_cleanupClient.GetManagementGroup(mgmtGroupId).Delete(waitForCompletion: false);
121121
}
122122
catch (RequestFailedException e) when (e.Status == 404 || e.Status == 403)
123123
{
@@ -202,11 +202,11 @@ public void OneTimeCleanupResourceGroups()
202202
Parallel.ForEach(OneTimeResourceGroupCleanupPolicy.ResourceGroupsCreated, resourceGroup =>
203203
{
204204
var sub = _cleanupClient.GetSubscriptions().GetIfExists(SessionEnvironment.SubscriptionId);
205-
sub.Value?.GetResourceGroups().Get(resourceGroup).Value.Delete();
205+
sub.Value?.GetResourceGroups().Get(resourceGroup).Value.Delete(waitForCompletion: false);
206206
});
207207
Parallel.ForEach(OneTimeManagementGroupCleanupPolicy.ManagementGroupsCreated, mgmtGroupId =>
208208
{
209-
_cleanupClient.GetManagementGroup(mgmtGroupId).Delete();
209+
_cleanupClient.GetManagementGroup(mgmtGroupId).Delete(waitForCompletion: false);
210210
});
211211
}
212212

sdk/network/Azure.ResourceManager.Network/tests/Helpers/NetworkServiceClientTestBase.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,23 @@
1010
using Azure.ResourceManager.Resources;
1111
using Azure.ResourceManager.Resources.Models;
1212
using Azure.ResourceManager.Network.Models;
13-
using Azure.ResourceManager.Network.Tests.Tests;
1413
using Azure.ResourceManager.TestFramework;
1514

1615
using NUnit.Framework;
1716

1817
namespace Azure.ResourceManager.Network.Tests.Helpers
1918
{
20-
[RunFrequency(RunTestFrequency.Manually)]
2119
public class NetworkServiceClientTestBase : ManagementRecordedTestBase<NetworkManagementTestEnvironment>
2220
{
2321
private const string dummySSHKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+wWK73dCr+jgQOAxNsHAnNNNMEMWOHYEccp6wJm2gotpr9katuF/ZAdou5AaW1C61slRkHRkpRRX9FA9CYBiitZgvCCz+3nWNN7l/Up54Zps/pHWGZLHNJZRYyAB6j5yVLMVHIHriY49d/GZTZVNB8GoJv9Gakwc/fuEZYYl4YDFiGMBP///TzlI4jhiJzjKnEvqPFki5p2ZRJqcbCiF4pJrxUQR/RXqVFQdbRLZgYfJ8xGB878RENq3yQ39d8dVOkq4edbkzwcUmwwwkYVPIoDGsYLaRHnG+To7FvMeyO7xDVQkMKzopTQV8AuKpyvpqu0a9pWOMaiCyDytO7GGN you@me.com";
2422
public NetworkServiceClientTestBase(bool isAsync) : base(isAsync)
2523
{
2624
}
2725

26+
public NetworkServiceClientTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode)
27+
{
28+
}
29+
2830
public bool IsTestTenant = false;
2931
public static TimeSpan ZeroPollingInterval { get; } = TimeSpan.FromSeconds(0);
3032
public Dictionary<string, string> Tags { get; internal set; }

0 commit comments

Comments
 (0)