File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ class ConfigVariationTest(t.NamedTuple):
115
115
{CLONE_NAME}:
116
116
repo: git+file://{dir}
117
117
remotes:
118
- git_scheme_repo: git+git @github.com:tony/vcspull.git
118
+ git_scheme_repo: [email protected] :tony/vcspull.git
119
119
""" ,
120
120
remote_list = ["git_scheme_repo" ],
121
121
),
@@ -153,7 +153,6 @@ def test_config_variations(
153
153
assert len (repos ) == 1
154
154
155
155
for repo_dict in repos :
156
- repo_url = repo_dict ["url" ].replace ("git+" , "" )
157
156
repo : GitSync = update_repo (repo_dict )
158
157
remotes = repo .remotes () or {}
159
158
remote_names = set (remotes .keys ())
@@ -171,9 +170,19 @@ def test_config_variations(
171
170
and isinstance (repo_dict ["remotes" ], dict )
172
171
and remote_name in repo_dict ["remotes" ]
173
172
):
174
- assert current_remote .fetch_url == repo_dict ["remotes" ][
175
- remote_name
176
- ].fetch_url .replace ("git+" , "" )
173
+ if repo_dict ["remotes" ][remote_name ].fetch_url .startswith (
174
+ "git+file://"
175
+ ):
176
+ assert current_remote .fetch_url == repo_dict ["remotes" ][
177
+ remote_name
178
+ ].fetch_url .replace (
179
+ "git+" , ""
180
+ ), "Final git remote should chop git+ prefix"
181
+ else :
182
+ assert (
183
+ current_remote .fetch_url
184
+ == repo_dict ["remotes" ][remote_name ].fetch_url
185
+ )
177
186
178
187
179
188
class UpdatingRemoteFixture (t .NamedTuple ):
You can’t perform that action at this time.
0 commit comments