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
20 changes: 20 additions & 0 deletions MessagingService.IntegrationTests/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using NUnit.Framework;
using System.Runtime.InteropServices;

// In SDK-style projects such as this one, several assembly attributes that were historically
// defined in this file are now automatically added during build and populated with
// values defined in project properties. For details of which attributes are included
// and how to customise this process see: https://aka.ms/assembly-info-properties


// Setting ComVisible to false makes the types in this assembly not visible to COM
// components. If you need to access a type in this assembly from COM, set the ComVisible
// attribute to true on that type.

[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM.

[assembly: Guid("70c8d747-842f-4d4d-8c60-f7c46bf81088")]
[assembly: LevelOfParallelism(2)]
[assembly: Parallelizable(ParallelScope.Fixtures)]
15 changes: 10 additions & 5 deletions MessagingService.IntegrationTests/Common/Setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,23 @@ public class Setup
public static INetworkService DatabaseServerNetwork;
public static (String usename, String password) SqlCredentials = ("sa", "thisisalongpassword123!");
public static (String url, String username, String password) DockerCredentials = ("https://www.docker.com", "stuartferguson", "Sc0tland");

static object padLock = new object(); // Object to lock on

public static async Task GlobalSetup(DockerHelper dockerHelper)
{
ShouldlyConfiguration.DefaultTaskTimeout = TimeSpan.FromMinutes(1);
dockerHelper.SqlCredentials = Setup.SqlCredentials;
dockerHelper.DockerCredentials = Setup.DockerCredentials;
dockerHelper.SqlServerContainerName = "sharedsqlserver";

await Retry.For(async () => {
Setup.DatabaseServerNetwork = dockerHelper.SetupTestNetwork("sharednetwork", true);
Setup.DatabaseServerContainer = await dockerHelper.SetupSqlServerContainer(Setup.DatabaseServerNetwork);
},TimeSpan.FromSeconds(60));
// Only one thread can execute this block at a time
lock (Setup.padLock)
{
Setup.DatabaseServerNetwork = dockerHelper.SetupTestNetwork("sharednetwork");

dockerHelper.Logger.LogInformation("in start SetupSqlServerContainer");
Setup.DatabaseServerContainer = dockerHelper.SetupSqlServerContainer(Setup.DatabaseServerNetwork).Result;
}
}

public static String GetConnectionString(String databaseName)
Expand Down
71 changes: 20 additions & 51 deletions MessagingService.IntegrationTests/Email/SendEmail.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="2024.4.2" />
<PackageReference Include="ClientProxyBase" Version="2024.4.3" />
<PackageReference Include="Ductus.FluentDocker" Version="2.10.59" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Reqnroll.Tools.MsBuild.Generation" Version="1.0.1" />
<PackageReference Include="Reqnroll.xUnit" Version="1.0.1" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Reqnroll" Version="1.0.1" />
<PackageReference Include="Reqnroll.NUnit" Version="1.0.1" />
<PackageReference Include="SecurityService.Client" Version="2024.3.1" />
<PackageReference Include="SecurityService.IntegrationTesting.Helpers" Version="2024.3.1" />
<PackageReference Include="Shared.IntegrationTesting" Version="2024.4.2" />
<PackageReference Include="Shared.IntegrationTesting" Version="2024.4.3" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -32,18 +30,6 @@
<ProjectReference Include="..\MessagingService.IntegrationTesting.Helpers\MessagingService.IntegrationTesting.Helpers.csproj" />
</ItemGroup>

<!--<ItemGroup>
<SpecFlowFeatureFiles Update="Email\SendEmail.feature">
<Generator>SpecFlowSingleFileGenerator</Generator>
<LastGenOutput>SendEmail.feature.cs</LastGenOutput>
<Generator Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"></Generator>
</SpecFlowFeatureFiles>
<SpecFlowFeatureFiles Update="SMS\SendSMS.feature">
<Generator>SpecFlowSingleFileGenerator</Generator>
<LastGenOutput>SendSMS.feature.cs</LastGenOutput>
</SpecFlowFeatureFiles>
</ItemGroup>-->

<ItemGroup>
<Compile Update="Email\SendEmail.feature.cs">
<DesignTime>True</DesignTime>
Expand Down
66 changes: 18 additions & 48 deletions MessagingService.IntegrationTests/SMS/SendSMS.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.