From f0780d2927167fa1eb6c0f75621426799b756465 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 28 Jan 2017 23:06:30 +0200 Subject: [PATCH] - Pass test on older versions of Git. --- tests/test_gitreceive.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/test_gitreceive.py b/tests/test_gitreceive.py index 6e2a40d..c9c6f14 100644 --- a/tests/test_gitreceive.py +++ b/tests/test_gitreceive.py @@ -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 ...', - '----> Running receiver ...', 'Dummy receiver script', - '----> Cleanup ...', '----> OK.']: + for message in [ + '----> Unpacking ...', '----> Fetching submodules ...', + '----> Running receiver ...', 'Dummy receiver script', + '----> 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 -- GitLab