Beispiel #1
0
def test_action_plugin_run_list_checks(monkeypatch):
    task = FakeTask('openshift_health_check', {'checks': []})
    plugin = ActionModule(task, None, PlayContext(), None, None, None)
    monkeypatch.setattr(plugin, 'load_known_checks', lambda *_: {})
    result = plugin.run()

    assert failed(result, msg_has="Available checks")
    assert not changed(result)
    assert not skipped(result)
def test_action_plugin_run_list_checks(monkeypatch):
    task = FakeTask('openshift_health_check', {'checks': []})
    plugin = ActionModule(task, FakeConnection(), PlayContext(), None, None, None)
    monkeypatch.setattr(plugin, 'load_known_checks', lambda *_: {})
    result = plugin.run()

    assert failed(result, msg_has="Available checks")
    assert not changed(result)
    assert not skipped(result)
def plugin():
    task = FakeTask('openshift_health_check', {'checks': ['fake_check']})
    plugin = ActionModule(task, None, PlayContext(), None, None, None)
    return plugin