Skip to content

Commit 5e08b0d

Browse files
authored
[EventHubs] Remove the dependency on storage and update tests (Azure#29550)
* remove the dependency on storage and update tests * remove package reference to resources
1 parent 7f3a5b0 commit 5e08b0d

14 files changed

+6809
-24355
lines changed

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Azure.ResourceManager.EventHubs.Tests.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<ItemGroup>
33
<ProjectReference Include="..\src\Azure.ResourceManager.EventHubs.csproj" />
4-
<ProjectReference Include="..\..\..\storage\Azure.ResourceManager.Storage\src\Azure.ResourceManager.Storage.csproj" />
5-
<ProjectReference Include="..\..\..\resources\Azure.ResourceManager.Resources\src\Azure.ResourceManager.Resources.csproj" />
64
<ProjectReference Include="..\..\..\network\Azure.ResourceManager.Network\src\Azure.ResourceManager.Network.csproj" />
75
</ItemGroup>
86
<ItemGroup>

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/SessionRecords/EventhubTests/CreateEventhubWithParameter.json

Lines changed: 1923 additions & 3044 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/SessionRecords/EventhubTests/CreateEventhubWithParameterAsync.json

Lines changed: 1905 additions & 3233 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/SessionRecords/PrivateEndpointConnectionTests/GetAllPrivateEndpointConnection.json

Lines changed: 669 additions & 4637 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/SessionRecords/PrivateEndpointConnectionTests/GetAllPrivateEndpointConnectionAsync.json

Lines changed: 692 additions & 4598 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/SessionRecords/PrivateEndpointConnectionTests/PrivateEndpointConnectionDelete.json

Lines changed: 841 additions & 4264 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/SessionRecords/PrivateEndpointConnectionTests/PrivateEndpointConnectionDeleteAsync.json

Lines changed: 761 additions & 4471 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Tests/ConsumerGroupTests.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ public async Task CreateNamespaceAndGetEventhubCollection()
3636
_consumerGroupCollection = _eventHub.GetEventHubsConsumerGroups();
3737
}
3838

39-
[TearDown]
40-
public async Task ClearNamespaces()
41-
{
42-
//remove all namespaces under current resource group
43-
if (_resourceGroup != null)
44-
{
45-
EventHubsNamespaceCollection namespaceCollection = _resourceGroup.GetEventHubsNamespaces();
46-
List<EventHubsNamespaceResource> namespaceList = await namespaceCollection.GetAllAsync().ToEnumerableAsync();
47-
foreach (EventHubsNamespaceResource eventHubNamespace in namespaceList)
48-
{
49-
await eventHubNamespace.DeleteAsync(WaitUntil.Completed);
50-
}
51-
_resourceGroup = null;
52-
}
53-
}
54-
5539
[Test]
5640
[RecordedTest]
5741
public async Task CreateDeleteConsumerGroup()

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Tests/DisasterRecoveryTests.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,6 @@ public class DisasterRecoveryTests : EventHubTestBase
2121
public DisasterRecoveryTests(bool isAsync) : base(isAsync)
2222
{
2323
}
24-
[TearDown]
25-
public async Task ClearNamespaces()
26-
{
27-
//remove all namespaces under current resource group
28-
if (_resourceGroup != null)
29-
{
30-
EventHubsNamespaceCollection namespaceCollection = _resourceGroup.GetEventHubsNamespaces();
31-
List<EventHubsNamespaceResource> namespaceList = await namespaceCollection.GetAllAsync().ToEnumerableAsync();
32-
foreach (EventHubsNamespaceResource eventHubNamespace in namespaceList)
33-
{
34-
await eventHubNamespace.DeleteAsync(WaitUntil.Completed);
35-
}
36-
_resourceGroup = null;
37-
}
38-
}
3924

4025
[Test]
4126
[RecordedTest]

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Tests/EventHubNamespaceTests.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,6 @@ public EventHubNamespaceTests(bool isAsync) : base(isAsync)
2424
{
2525
}
2626

27-
[TearDown]
28-
public async Task ClearNamespaces()
29-
{
30-
//remove all namespaces under current resource group
31-
if (_resourceGroup != null)
32-
{
33-
EventHubsNamespaceCollection namespaceCollection = _resourceGroup.GetEventHubsNamespaces();
34-
List<EventHubsNamespaceResource> namespaceList = await namespaceCollection.GetAllAsync().ToEnumerableAsync();
35-
foreach (EventHubsNamespaceResource eventHubNamespace in namespaceList)
36-
{
37-
await eventHubNamespace.DeleteAsync(WaitUntil.Completed);
38-
}
39-
_resourceGroup = null;
40-
}
41-
}
42-
4327
[Test]
4428
[RecordedTest]
4529
public async Task CreateDeleteNamespace()

0 commit comments

Comments
 (0)