mirror of https://github.com/docker/compose.git
Test that values in 'environment' override env files
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
0e28163ccb
commit
ba249e5179
|
@ -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': [
|
||||
|
|
Loading…
Reference in New Issue