# HG changeset patch # User Daniel Dourvaris # Date 2019-02-28 11:45:48 # Node ID 442219c2d4a95e8c0a7a287e726878491996d3e9 # Parent a87725c8ac40ba1504290105fc310ec6b9bfbed6 tests: protocol ops, added --pull and --pull --stream clone tests diff --git a/rhodecode/tests/vcs_operations/test_vcs_operations.py b/rhodecode/tests/vcs_operations/test_vcs_operations.py --- a/rhodecode/tests/vcs_operations/test_vcs_operations.py +++ b/rhodecode/tests/vcs_operations/test_vcs_operations.py @@ -54,6 +54,20 @@ class TestVCSOperations(object): 'hg clone', clone_url, tmpdir.strpath) _check_proper_clone(stdout, stderr, 'hg') + def test_clone_hg_repo_by_admin_pull_protocol(self, rc_web_server, tmpdir): + clone_url = rc_web_server.repo_clone_url(HG_REPO) + stdout, stderr = Command('/tmp').execute( + 'hg clone --pull', clone_url, tmpdir.strpath) + _check_proper_clone(stdout, stderr, 'hg') + + def test_clone_hg_repo_by_admin_pull_stream_protocol(self, rc_web_server, tmpdir): + clone_url = rc_web_server.repo_clone_url(HG_REPO) + stdout, stderr = Command('/tmp').execute( + 'hg clone --pull --stream', clone_url, tmpdir.strpath) + assert '225 files to transfer, 1.04 MB of data' in stdout + assert 'transferred 1.04 MB' in stdout + assert '114 files updated,' in stdout + def test_clone_git_repo_by_admin(self, rc_web_server, tmpdir): clone_url = rc_web_server.repo_clone_url(GIT_REPO) cmd = Command('/tmp')