public async Task ShouldReturnFalseIfDockerHostNotSet() { // arrange Environment.SetEnvironmentVariable(EnvironmentDockerClientProvider.DockerHostEnvironmentVariable, ""); var provider = new EnvironmentDockerClientProvider(NullLogger <EnvironmentDockerClientProvider> .Instance); // act var result = await provider.TryTest(); // assert Assert.False(result); }
public async Task ShouldReturnFalseIfDockerDoesNotExistAtDockerHost() { // arrange const string mockDockerHostUri = "tcp://my-mock-docker-host"; Environment.SetEnvironmentVariable(EnvironmentDockerClientProvider.DockerHostEnvironmentVariable, mockDockerHostUri); var provider = new EnvironmentDockerClientProvider(NullLogger <EnvironmentDockerClientProvider> .Instance); // act var result = await provider.TryTest(); // assert Assert.False(result); }