Skip to content

Commit

Permalink
chore: Improve error message when Docker is not running (#987)
Browse files Browse the repository at this point in the history
Co-authored-by: Andre Hofmeister <9199345+HofmeisterAn@users.noreply.github.com>
  • Loading branch information
0xced and HofmeisterAn authored Sep 1, 2023
1 parent 31e0b9b commit 604ae2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Testcontainers/Builders/AbstractBuilder`4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ protected virtual TBuilderEntity Init()
/// <exception cref="ArgumentException">Thrown when a mandatory Docker resource configuration is not set.</exception>
protected virtual void Validate()
{
const string message = "Cannot detect the Docker endpoint. Use either the environment variables or the ~/.testcontainers.properties file to customize your configuration:\nhttps://dotnet.testcontainers.org/custom_configuration/";
const string message = "Docker is either not running or misconfigured. Please ensure that Docker is running and that the endpoint is properly configured. You can customize your configuration using either the environment variables or the ~/.testcontainers.properties file. For more information, visit:\nhttps://dotnet.testcontainers.org/custom_configuration/";
_ = Guard.Argument(DockerResourceConfiguration.DockerEndpointAuthConfig, nameof(IResourceConfiguration<TCreateResourceEntity>.DockerEndpointAuthConfig))
.ThrowIf(argument => argument.Value == null, argument => new ArgumentException(message, argument.Name));
}
Expand Down

0 comments on commit 604ae2c

Please sign in to comment.