Beispiel #1
0
def test_plugins_emr_fail_on_command(mocker, remote, ci_payload, mode):
    mocker.patch("loktar.plugin.exe", return_value=False)

    ci_payload["mode"] = mode

    with pytest.raises(CITestFail):
        run(ci_payload, remote)
Beispiel #2
0
def test_plugins_emr_fail_on_input_type(mocker, remote, ci_payload):
    mocker.patch("loktar.plugin.exe")

    input_type = "the new and awesome input type"
    ci_payload["build_info"]["input_type"] = input_type

    with pytest.raises(CIBuildPackageFail) as excinfo:
        run(ci_payload, remote)
        assert str(excinfo) == "the input type : '{}' is not managed, create a pr for integrate this input type"\
                               .format(input_type)
Beispiel #3
0
def test_plugins_emr_fail_on_call():
    with pytest.raises(TypeError):
        output = run()
        assert output == EMR.__init__.__doc__
Beispiel #4
0
def test_plugins_emr(mocker, remote, ci_payload, mode):
    mocker.patch("loktar.plugin.exe")

    ci_payload["mode"] = mode

    run(ci_payload, remote)