diff --git a/api/internal/git/repospec_test.go b/api/internal/git/repospec_test.go index 6d8c6568c..84a878164 100644 --- a/api/internal/git/repospec_test.go +++ b/api/internal/git/repospec_test.go @@ -92,10 +92,6 @@ func TestNewRepoSpecFromUrlErrors(t *testing.T) { "htxxxtp://github.com/", "url lacks host", }, - "bad_scp": { - "git@local/path:file/system", - "url lacks repoPath", - }, "no_org_repo": { "ssh://git.example.com", "url lacks repoPath", @@ -588,6 +584,18 @@ func TestNewRepoSpecFromUrl_Smoke(t *testing.T) { GitSuffix: ".git", }, }, + { + name: "colon behind slash not scp delimiter", + input: "git@gitlab.com/user:name/YOUR-REPOSITORY.git/path", + cloneSpec: "git@gitlab.com/user:name/YOUR-REPOSITORY.git", + absPath: notCloned.Join("path"), + repoSpec: RepoSpec{ + Host: "git@gitlab.com/", + RepoPath: "user:name/YOUR-REPOSITORY", + KustRootPath: "path", + GitSuffix: ".git", + }, + }, } for _, tc := range testcases { t.Run(tc.name, func(t *testing.T) {