diff --git a/specmatic-order-bff-csharp.test/contract/ContractTests.cs b/specmatic-order-bff-csharp.test/contract/ContractTests.cs index d0cef9a..7663783 100644 --- a/specmatic-order-bff-csharp.test/contract/ContractTests.cs +++ b/specmatic-order-bff-csharp.test/contract/ContractTests.cs @@ -17,11 +17,7 @@ public class ContractTests : IAsyncLifetime [Fact] public async Task ContractTestsAsync() { - var readBytes = await _testContainer - .ReadFileAsync(TestContainerDirectory+ "/build/reports/specmatic/html/index.html"); - var file = new FileInfo(Pwd + "/reports/specmaticReport.html"); - file.Directory?.Create(); - await File.WriteAllBytesAsync(file.FullName, readBytes); + await RunContractTests(); } public async Task InitializeAsync() @@ -31,7 +27,6 @@ await TestcontainersSettings.ExposeHostPortsAsync(8080) StartOrderBffService(); await StartDomainServiceStub(); - await RunContractTests(); } private async Task RunContractTests() @@ -45,6 +40,7 @@ private async Task RunContractTests() .WithPortBinding(8090) .WithExposedPort(8090) .WithWaitStrategy(Wait.ForUnixContainer().UntilMessageIsLogged("Tests run:")) + .WithBindMount($"{Pwd}/reports", $"{TestContainerDirectory}/build/reports") .WithBindMount( $"{Pwd}/specmatic.yaml", $"{TestContainerDirectory}/specmatic.yaml").Build();