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
33 changes: 22 additions & 11 deletions Shared.IntegrationTesting/BaseDockerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public enum DockerEnginePlatform{
public abstract class BaseDockerHelper{
#region Fields

public Boolean SkipHealthChecks;

public Dictionary<ContainerType, List<String>> AdditionalVariables = new Dictionary<ContainerType, List<String>>();

public (String URL, String UserName, String Password)? DockerCredentials;
Expand Down Expand Up @@ -114,7 +116,8 @@ public abstract class BaseDockerHelper{

#region Constructors

public BaseDockerHelper(){
protected BaseDockerHelper(Boolean skipHealthChecks=false) {
this.SkipHealthChecks = skipHealthChecks;
this.Containers = new ();
this.TestNetworks = new List<INetworkService>();
this.HealthCheckClient = new HealthCheckClient(new HttpClient(new SocketsHttpHandler{
Expand Down Expand Up @@ -949,16 +952,24 @@ protected async Task<IContainerService> StartContainer2(Func<ContainerBuilder> b

this.SetHostPortForService(type, startedContainer);

switch(type){
case ContainerType.EventStore:
await DoEventStoreHealthCheck();
break;
case ContainerType.SqlServer:
await DoSqlServerHealthCheck(startedContainer);
break;
default:
await this.DoHealthCheck(type);
break;
if (this.SkipHealthChecks == true) {
this.Trace($"Container [{buildContainerFunc.Method.Name}] health check skipped");
}

else {

switch (type)
{
case ContainerType.EventStore:
await DoEventStoreHealthCheck();
break;
case ContainerType.SqlServer:
await DoSqlServerHealthCheck(startedContainer);
break;
default:
await this.DoHealthCheck(type);
break;
}
}

this.Trace($"Container [{buildContainerFunc.Method.Name}] started");
Expand Down
2 changes: 1 addition & 1 deletion Shared.IntegrationTesting/DockerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public enum DockerServices{

public abstract class DockerHelper : BaseDockerHelper
{
protected DockerHelper() :base(){
protected DockerHelper(Boolean skipHealthChecks=false) :base(skipHealthChecks){
}

protected virtual void SetHostTraceFolder(String scenarioName) {
Expand Down
Loading