Skip to content

Commit 2a510d7

Browse files
author
Oleksii Sokol
committed
mongo tests
1 parent 578f43e commit 2a510d7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ManagedCode.Database.Tests/MongoDBTests/MongoDBCollectionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace ManagedCode.Database.Tests.MongoDBTests;
1111

12-
[Collection(nameof(MongoDBTestContainer))]
12+
[Collection("MongoDB collection")]
1313
public class MongoDBCollectionTests : BaseCollectionTests<ObjectId, TestMongoDBItem>
1414
{
1515
public MongoDBCollectionTests() : base(new MongoDBTestContainer())

ManagedCode.Database.Tests/TestContainers/MongoDBTestContainer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
namespace ManagedCode.Database.Tests.TestContainers;
1616

17-
[CollectionDefinition(nameof(MongoDBTestContainer))]
1817
public class MongoDBTestContainer : ITestContainer<ObjectId, TestMongoDBItem>, IDisposable
1918
{
2019
//private readonly ITestOutputHelper _testOutputHelper;
@@ -79,6 +78,7 @@ public async Task InitializeAsync()
7978
containerId = containerListResponse.ID;
8079

8180
publicPort = containerListResponse.Ports.Single(port => port.PrivatePort == privatePort).PublicPort;
81+
8282
}
8383

8484
_dbDatabase = new MongoDBDatabase(new MongoDBOptions()
@@ -106,7 +106,7 @@ public async void Dispose()
106106
{
107107
await _dockerClient.Containers.StopContainerAsync(containerId, new ContainerStopParameters());
108108

109-
// await _dockerClient.Containers.RemoveContainerAsync(containerId, new ContainerRemoveParameters());
109+
await _dockerClient.Containers.RemoveContainerAsync(containerId, new ContainerRemoveParameters());
110110

111111
}
112112
}

0 commit comments

Comments
 (0)