Exemplo n.º 1
0
def test_check_is_rebuild(build_json):
    key = 'client'
    value = 'osbs'
    workflow, runner = prepare(key, value)

    os.environ["BUILD"] = json.dumps(build_json)

    runner.run()
    assert workflow.prebuild_results[CheckRebuildPlugin.key] == True
    assert is_rebuild(workflow)
Exemplo n.º 2
0
def test_check_is_rebuild(build_json):
    key = 'client'
    value = 'osbs'
    workflow, runner = prepare(key, value)

    os.environ["BUILD"] = json.dumps(build_json)

    runner.run()
    assert workflow.prebuild_results[CheckRebuildPlugin.key] == True
    assert is_rebuild(workflow)
Exemplo n.º 3
0
def test_check_is_not_rebuild():
    key = 'client'
    value = 'osbs'
    workflow, runner = prepare(key, value)

    os.environ["BUILD"] = json.dumps({"metadata": {
        key: value,
    }})

    runner.run()
    assert workflow.prebuild_results[CheckRebuildPlugin.key] == False
    assert not is_rebuild(workflow)
Exemplo n.º 4
0
def test_check_is_not_rebuild():
    key = 'client'
    value = 'osbs'
    workflow, runner = prepare(key, value)

    os.environ["BUILD"] = json.dumps({
        "metadata": {
            key: value,
        }
    })

    runner.run()
    assert workflow.prebuild_results[CheckRebuildPlugin.key] == False
    assert not is_rebuild(workflow)