Skip to content

Commit

Permalink
Update error message: s/non-unique/duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
rhcarvalho committed Aug 21, 2017
1 parent 3ba2fbb commit 48af29f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ def load_known_checks(self, tmp, task_vars):
name = cls.name
if name in known_checks:
other_cls = known_checks[name].__class__
msg = "non-unique check name '{}' in: '{}' and '{}'".format(
name,
full_class_name(cls),
full_class_name(other_cls),
raise OpenShiftCheckException(
"duplicate check name '{}' in: '{}' and '{}'"
"".format(name, full_class_name(cls), full_class_name(other_cls))
)
raise OpenShiftCheckException(msg)
known_checks[name] = cls(execute_module=self._execute_module, tmp=tmp, task_vars=task_vars)
return known_checks

Expand Down
2 changes: 1 addition & 1 deletion roles/openshift_health_checker/test/action_plugin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_action_plugin_cannot_load_checks_with_the_same_name(plugin, task_vars,

result = plugin.run(tmp=None, task_vars=task_vars)

assert failed(result, msg_has=['unique', 'duplicate_name', 'FakeCheck'])
assert failed(result, msg_has=['duplicate', 'duplicate_name', 'FakeCheck'])


def test_action_plugin_skip_non_active_checks(plugin, task_vars, monkeypatch):
Expand Down

0 comments on commit 48af29f

Please sign in to comment.