Test that values in 'environment' override env files

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2016-11-09 15:10:02 +00:00
parent 0e28163ccb
commit ba249e5179
1 changed files with 9 additions and 0 deletions

View File

@ -2493,6 +2493,15 @@ class EnvTest(unittest.TestCase):
{'ONE': '2', 'TWO': '1', 'THREE': '3', 'FOO': 'bar'},
)
def test_environment_overrides_env_file(self):
self.assertEqual(
resolve_environment({
'environment': {'FOO': 'baz'},
'env_file': ['tests/fixtures/env/one.env'],
}),
{'ONE': '2', 'TWO': '1', 'THREE': '3', 'FOO': 'baz'},
)
def test_resolve_environment_with_multiple_env_files(self):
service_dict = {
'env_file': [