diff --git a/tests/test_gitreceive.py b/tests/test_gitreceive.py index 6e2a40df208932afee014c39ece3602c57284361..c9c6f14f6d13ec40679bd9e42dfe957e0b4a1f00 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