diff --git a/tests/test_parser.py b/tests/test_parser.py index 0e3d33f..cf996c1 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -9,10 +9,10 @@ def test_parser_error_parsing_file() -> None: def test_parser_invalid_yaml() -> None: - with pytest.raises(RuntimeError, match=r"Empty yaml file, aborting."): + with pytest.raises(RuntimeError, match=r"Error parsing file 'tests/ymls/others/empty.yml'.*"): Parser().parse("tests/ymls/others/empty.yml") def test_parser_no_services_found() -> None: - with pytest.raises(RuntimeError, match=r"No services found, aborting."): + with pytest.raises(AssertionError, match=r"No services found, aborting."): Parser().parse("tests/ymls/others/no-services.yml") diff --git a/tests/ymls/others/no-services.yml b/tests/ymls/others/no-services.yml index a0bf4a1..30200b0 100644 --- a/tests/ymls/others/no-services.yml +++ b/tests/ymls/others/no-services.yml @@ -1,3 +1 @@ -what-is-this: - - "a yaml file without services" - - "test purpose" +version: "A docker-compose file without services."