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
4d85caf143
commit
46f034705e
|
@ -2493,6 +2493,15 @@ class EnvTest(unittest.TestCase):
|
||||||
{'ONE': '2', 'TWO': '1', 'THREE': '3', 'FOO': 'bar'},
|
{'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):
|
def test_resolve_environment_with_multiple_env_files(self):
|
||||||
service_dict = {
|
service_dict = {
|
||||||
'env_file': [
|
'env_file': [
|
||||||
|
|
Loading…
Reference in New Issue