Commit f0780d29 authored by nimrod's avatar nimrod
Browse files

- Pass test on older versions of Git.

parent 214fbe80
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -6,13 +6,17 @@ testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all')
def test_gitreceive(Command, Sudo):
    with Sudo():
        Command('rm -rf /home/git/test /var/tmp/gitreceive')
        push = Command('git -C /root/gitreceive-test push test master')
        push = Command(
            'git --git-dir /root/gitreceive-test/.git push test master')
    assert push.rc == 0
    for message in ['----> Unpacking ...', '----> Fetching submodules ...',
    for message in [
            '----> Unpacking ...', '----> Fetching submodules ...',
            '----> Running receiver ...', 'Dummy receiver script',
                    '----> Cleanup ...', '----> OK.']:
            '----> Cleanup ...', '----> OK.'
    ]:
        assert message in push.stderr
    with Sudo():
        second_push = Command('git -C /root/gitreceive-test push test master')
        second_push = Command(
            'git --git-dir /root/gitreceive-test/.git push test master')
    assert second_push.rc == 0
    assert 'Everything up-to-date' in second_push.stderr