Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace Bravellian.Platform.Tests;
/// Tests in this collection will share the same PostgreSQL container but get individual databases.
/// </summary>
[CollectionDefinition(Name)]
[Trait("RequiresDocker", "true")]
public class PostgresCollection : ICollectionFixture<PostgresCollectionFixture>
{
public const string Name = "Postgres Collection";
Expand Down
1 change: 1 addition & 0 deletions tests/Bravellian.Platform.Tests/SqlServerCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace Bravellian.Platform.Tests;
/// Tests in this collection will share the same SQL Server container but get individual databases.
/// </summary>
[CollectionDefinition(Name)]
[Trait("RequiresDocker", "true")]
public class SqlServerCollection : ICollectionFixture<SqlServerCollectionFixture>
{
public const string Name = "SQL Server Collection";
Expand Down
4 changes: 4 additions & 0 deletions tests/Bravellian.Platform.Tests/SqlServerCollectionFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ public async Task<string> CreateTestDatabaseAsync(string name)

internal void EnsureAvailable()
{
if (!isAvailable)
{
throw new InvalidOperationException("SQL Server tests cannot run because sqlcmd is not available. Install SQL Server command-line tools to run these tests.");
}
}
}

Loading