Esempio n. 1
0
        public void DockerHostWasSetup_ShouldChangeToValue()
        {
            IDictionary environmentVariables = new Dictionary <string, string>();

            environmentVariables.Add("DOCKER_HOST", "tcp://192.168.0.1");
            var parser = new DockerHostParser("Host=$DOCKER_HOST$;Port=5432", environmentVariables);

            Assert.Equal("Host=192.168.0.1;Port=5432", parser.Parse());
        }
Esempio n. 2
0
        public void DockerHostIsEmpty_ShouldChangeToLocalhost()
        {
            IDictionary environmentVariables = new Dictionary <string, string>();

            environmentVariables.Add("DOCKER_HOST", "");
            var parser = new DockerHostParser("Host=$DOCKER_HOST$;Port=5432", environmentVariables);

            Assert.Equal("Host=localhost;Port=5432", parser.Parse());
        }