fix: share one PostgreSQL Testcontainer across all test projects
Create Heimdall.TestCommon project with a single PostgreSqlContainerFixture shared by both Infrastructure and Integration tests. This prevents Docker resource conflicts from starting two PostgreSQL containers and ensures both test suites connect to the same database instance. - Move shared fixture to tests/Heimdall.TestCommon - Remove duplicate fixtures from each test project - Keep test isolation (truncation) and FK fix from previous commit - Revert DATABASE_URL env var check (Testcontainers works in CI)
This commit is contained in:
1 parent
53e0d4c199
commit
b167c2afcf
12 files changed
+83
-122
No files matched your search
@@ -0,0 +1,12 @@
|
||||
using Heimdall.TestCommon;
|
||||
|
||||
namespace Heimdall.Infrastructure.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Collection definition for Infrastructure tests that need PostgreSQL.
|
||||
/// Uses the shared <see cref="PostgreSqlContainerFixture"/> from Heimdall.TestCommon.
|
||||
/// </summary>
|
||||
[CollectionDefinition("PostgresInfra")]
|
||||
public sealed class PostgresInfraDefinition : ICollectionFixture<PostgreSqlContainerFixture>
|
||||
{
|
||||
}
|
||||
Reference in new issue
Block a user