mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
Better SCP colon-must-be-after-slash test
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user