client-dotnet/tests/INetMock.Client.IntegrationTest/DockerEndpointTests.cs

23 lines
876 B
C#
Raw Normal View History

using Xunit;
namespace INetMock.Client.IntegrationTest
{
public class DockerEndpointTests
{
[Theory]
[InlineData(null, null, "unix:/var/run/docker.sock")]
[InlineData("tcp://docker:2375", null, "tcp://docker:2375")]
[InlineData("tcp://docker:2375", "0", "tcp://docker:2375")]
[InlineData("http://docker:2375", null, "http://docker:2375")]
[InlineData("http://docker:2375", "0", "http://docker:2375")]
[InlineData("tcp://docker:2376", "1", "https://docker:2376")]
[InlineData("https://docker:2376", "0", "https://docker:2376")]
public void DetermineDockerEndpoint_Input_ExpectedOutput(string? dockerHost, string? tlsVerify, string expected)
{
var actual = DockerEndpoint.DetermineEndpoint(dockerHost, tlsVerify);
Assert.Equal(expected, actual);
}
}
}