Skip to content

Commit 2e8ed2f

Browse files
committed
pytests: Add test for object required but path non existent
Signed-off-by: Monika Kairaityte <[email protected]>
1 parent 040b73a commit 2e8ed2f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pytests/test_container_to_args.py

+9
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,15 @@ async def test_env_file_obj_required(self):
352352
],
353353
)
354354

355+
async def test_env_file_obj_required_non_existent_path(self):
356+
c = create_compose_mock()
357+
358+
cnt = get_minimal_container()
359+
cnt['env_file'] = {'path': 'not-exists', 'required': True}
360+
361+
with self.assertRaises(ValueError):
362+
await container_to_args(c, cnt)
363+
355364
async def test_env_file_obj_optional(self):
356365
c = create_compose_mock()
357366

0 commit comments

Comments
 (0)