Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/molecule/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,8 @@ def _validate(self) -> None:

errors = schema_v3.validate(self.config)
if errors:
msg = f"Failed to validate {self.molecule_file}\n\n{errors}"
errors_resolved = "\n".join(errors)
msg = f"Failed to validate {self.molecule_file}\n\n{errors_resolved}"
sysexit_with_message(msg, code=1)


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def test_validate_exists_when_validation_fails( # noqa: D103
config_instance: config.Config,
) -> None:
m = mocker.patch("molecule.model.schema_v3.validate")
m.return_value = "validation errors"
m.return_value = ["validation errors"]

with pytest.raises(SystemExit) as e:
config_instance._validate()
Expand Down
Loading