Revert "Change special case from '_', None to ()"

This reverts commit 677c50650c.

Revert "Modify service_test.py::ServiceTest::test_resolve_env to reflect new behavior"

This reverts commit 0019037712.

Revert "Mangle the tests. They pass for better or worse!"

This reverts commit 7ab9509ce6.

Revert "If an env var is passthrough but not defined on the host don't set it."

This reverts commit 6540efb3d3.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2016-02-22 17:30:42 -08:00
commit bcd5286cd3
3 changed files with 7 additions and 5 deletions

View file

@ -909,6 +909,7 @@ class ServiceTest(DockerClientTestCase):
'FILE_DEF': 'F1',
'FILE_DEF_EMPTY': '',
'ENV_DEF': 'E3',
'NO_DEF': ''
}.items():
self.assertEqual(env[k], v)

View file

@ -1975,7 +1975,7 @@ class EnvTest(unittest.TestCase):
}
self.assertEqual(
resolve_environment(service_dict),
{'FILE_DEF': 'F1', 'FILE_DEF_EMPTY': '', 'ENV_DEF': 'E3'},
{'FILE_DEF': 'F1', 'FILE_DEF_EMPTY': '', 'ENV_DEF': 'E3', 'NO_DEF': ''},
)
def test_resolve_environment_from_env_file(self):
@ -2016,6 +2016,7 @@ class EnvTest(unittest.TestCase):
'FILE_DEF': u'bär',
'FILE_DEF_EMPTY': '',
'ENV_DEF': 'E3',
'NO_DEF': ''
},
)
@ -2034,7 +2035,7 @@ class EnvTest(unittest.TestCase):
}
self.assertEqual(
resolve_build_args(build),
{'arg1': 'value1', 'empty_arg': '', 'env_arg': 'value2'},
{'arg1': 'value1', 'empty_arg': '', 'env_arg': 'value2', 'no_env': ''},
)
@pytest.mark.xfail(IS_WINDOWS_PLATFORM, reason='paths use slash')