21 lines
769 B
C#
21 lines
769 B
C#
using MongoDB.Entities;
|
|||
|
|
|
||
|
|
using PrivaPub.Infrastructure.Data;
|
||
|
|
using PrivaPub.Tests.Support;
|
||
|
|
|
||
|
|
namespace PrivaPub.Tests.Infrastructure
|
||
|
|
{
|
||
|
|
[Trait("Category", "Integration")]
|
||
|
|
public sealed class TopologyTests
|
||
|
|
{
|
||
|
|
// tools/ci/with-test-mongod.sh starts a one-member replica set, as production's mongod is: the backup's snapshot reads
|
||
|
|
// are what the tests exercise
|
||
|
|
[Fact]
|
||
|
|
public async Task The_test_mongod_is_a_replica_set_like_productions()
|
||
|
|
{
|
||
|
|
Assert.SkipUnless(MongoFixture.Enabled, MongoFixture.Skip);
|
||
|
|
Assert.SkipUnless(MongoFixture.Connection.Contains("directConnection=true"), "a mongod not started by tools/ci/with-test-mongod.sh");
|
||
|
|
Assert.True(await MongoTopology.IsReplicaSet(DB.Default.Database(), TestContext.Current.CancellationToken));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|