File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -125,3 +125,22 @@ def test_clone_private_repo_fails_on_no_password(
125125 assert not repo_path .exists ()
126126 assert p_clone .stdout .count ("Username:" ) == 1
127127 assert p_clone .stdout .count ("Password:" ) == 1
128+
129+
130+ @pytest .mark .parametrize ("protocol" , ["http" , "https" ])
131+ def test_clone_gitlab (git2cpp_path , tmp_path , run_in_tmp_path , protocol ):
132+ repo_url = f"{ protocol } ://gitlab.quantstack.net/ianthomas23_group/cockle-playground"
133+
134+ clone_cmd = [git2cpp_path , "clone" , repo_url ]
135+ p_clone = subprocess .run (clone_cmd , capture_output = True , cwd = tmp_path , text = True )
136+ assert p_clone .returncode == 0
137+
138+ repo_path = tmp_path / "cockle-playground"
139+ assert repo_path .is_dir ()
140+ assert (repo_path / "src" ).is_dir ()
141+
142+ status_cmd = [git2cpp_path , "status" ]
143+ p_status = subprocess .run (status_cmd , capture_output = True , cwd = repo_path , text = True )
144+ assert p_status .returncode == 0
145+ assert "On branch main" in p_status .stdout
146+ assert "Your branch is up to date with 'origin/main'" in p_status .stdout
You can’t perform that action at this time.
0 commit comments