There was an error while loading. Please reload this page.
1 parent e4c7887 commit 0f94550Copy full SHA for 0f94550
2 files changed
src/molecule/config.py
@@ -751,7 +751,8 @@ def _validate(self) -> None:
751
752
errors = schema_v3.validate(self.config)
753
if errors:
754
- msg = f"Failed to validate {self.molecule_file}\n\n{errors}"
+ errors_resolved = "\n".join(errors)
755
+ msg = f"Failed to validate {self.molecule_file}\n\n{errors_resolved}"
756
sysexit_with_message(msg, code=1)
757
758
tests/unit/test_config.py
@@ -461,7 +461,7 @@ def test_validate_exists_when_validation_fails( # noqa: D103
461
config_instance: config.Config,
462
) -> None:
463
m = mocker.patch("molecule.model.schema_v3.validate")
464
- m.return_value = "validation errors"
+ m.return_value = ["validation errors"]
465
466
with pytest.raises(SystemExit) as e:
467
config_instance._validate()
0 commit comments