Show a nicer error when the env file doesn't exist
Closes #865 Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
dfc6206d0d
commit
de07e0471e
2 changed files with 8 additions and 0 deletions
|
|
@ -378,6 +378,10 @@ class ServiceEnvironmentTest(unittest.TestCase):
|
|||
{'ONE': '2', 'TWO': '1', 'THREE': '3', 'FOO': 'baz', 'DOO': 'dah'}
|
||||
)
|
||||
|
||||
def test_env_nonexistent_file(self):
|
||||
self.assertRaises(ConfigError, lambda: Service('foo', env_file='tests/fixtures/env/nonexistent.env'))
|
||||
|
||||
|
||||
@mock.patch.dict(os.environ)
|
||||
def test_resolve_environment_from_file(self):
|
||||
os.environ['FILE_DEF'] = 'E1'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue