Example #1
0
def test_hook_disppearing_repo_raises(hook_disappearing_repo, store):
    config = make_config_from_repo(
        hook_disappearing_repo.path,
        rev=hook_disappearing_repo.original_rev,
        hooks=[OrderedDict((('id', 'foo'), ))],
    )
    with pytest.raises(RepositoryCannotBeUpdatedError):
        _update_repo(config, store, tags_only=False)
Example #2
0
def test_hook_disppearing_repo_raises(hook_disappearing_repo, store):
    config = make_config_from_repo(
        hook_disappearing_repo.path,
        rev=hook_disappearing_repo.original_rev,
        hooks=[{'id': 'foo'}],
    )
    with pytest.raises(RepositoryCannotBeUpdatedError):
        _update_repo(config, store, tags_only=False)
Example #3
0
def test_hook_disppearing_repo_raises(
        hook_disappearing_repo, runner_with_mocked_store,
):
    config = make_config_from_repo(
        hook_disappearing_repo.path,
        sha=hook_disappearing_repo.original_sha,
        hooks=[OrderedDict((('id', 'foo'),))],
    )
    with pytest.raises(RepositoryCannotBeUpdatedError):
        _update_repo(config, runner_with_mocked_store, tags_only=False)
def test_out_of_date_repo(out_of_date_repo, runner_with_mocked_store):
    config = make_config_from_repo(
        out_of_date_repo.path, sha=out_of_date_repo.original_sha,
    )
    ret = _update_repo(config, runner_with_mocked_store, tags_only=False)
    assert ret['sha'] != out_of_date_repo.original_sha
    assert ret['sha'] == out_of_date_repo.head_sha
Example #5
0
def test_out_of_date_repo(out_of_date_repo, runner_with_mocked_store):
    config = make_config_from_repo(
        out_of_date_repo.path, sha=out_of_date_repo.original_sha,
    )
    ret = _update_repo(config, runner_with_mocked_store, tags_only=False)
    assert ret['sha'] != out_of_date_repo.original_sha
    assert ret['sha'] == out_of_date_repo.head_sha
Example #6
0
def test_out_of_date_repo(out_of_date_repo, store):
    config = make_config_from_repo(
        out_of_date_repo.path, rev=out_of_date_repo.original_rev,
    )
    ret = _update_repo(config, store, tags_only=False)
    assert ret['rev'] != out_of_date_repo.original_rev
    assert ret['rev'] == out_of_date_repo.head_rev
Example #7
0
def test_out_of_date_repo(out_of_date_repo, store):
    config = make_config_from_repo(
        out_of_date_repo.path, rev=out_of_date_repo.original_rev,
    )
    ret = _update_repo(config, store, tags_only=False)
    assert ret['rev'] != out_of_date_repo.original_rev
    assert ret['rev'] == out_of_date_repo.head_rev
Example #8
0
def test_up_to_date_repo(up_to_date_repo, store):
    config = make_config_from_repo(up_to_date_repo)
    input_rev = config['rev']
    ret = _update_repo(config, store, tags_only=False)
    assert ret['rev'] == input_rev
def test_up_to_date_repo(up_to_date_repo, runner_with_mocked_store):
    config = make_config_from_repo(up_to_date_repo)
    input_sha = config['sha']
    ret = _update_repo(config, runner_with_mocked_store, tags_only=False)
    assert ret['sha'] == input_sha
Example #10
0
def test_up_to_date_repo(up_to_date_repo, runner_with_mocked_store):
    config = make_config_from_repo(up_to_date_repo)
    input_sha = config['sha']
    ret = _update_repo(config, runner_with_mocked_store, tags_only=False)
    assert ret['sha'] == input_sha
Example #11
0
def test_up_to_date_repo(up_to_date_repo, store):
    config = make_config_from_repo(up_to_date_repo)
    input_rev = config['rev']
    ret = _update_repo(config, store, tags_only=False)
    assert ret['rev'] == input_rev