mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 18:10:59 +00:00
Add test case from github docs
This commit is contained in:
@@ -118,7 +118,7 @@ func TestNewRepoSpecFromUrlErrors(t *testing.T) {
|
||||
},
|
||||
"mysterious gh: prefix previously supported is no longer handled": {
|
||||
"gh:org/repo",
|
||||
"url lacks host",
|
||||
"url lacks orgRepo",
|
||||
},
|
||||
"username unsupported with http": {
|
||||
"http://git@foo.com/path/to/repo",
|
||||
@@ -536,6 +536,18 @@ func TestNewRepoSpecFromUrl_Smoke(t *testing.T) {
|
||||
GitSuffix: ".git",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "complex github ssh url from docs",
|
||||
input: "ssh://git@ssh.github.com:443/YOUR-USERNAME/YOUR-REPOSITORY.git",
|
||||
cloneSpec: "ssh://git@ssh.github.com:443/YOUR-USERNAME/YOUR-REPOSITORY.git",
|
||||
absPath: notCloned.String(),
|
||||
repoSpec: RepoSpec{
|
||||
Host: "ssh://git@ssh.github.com:443/",
|
||||
OrgRepo: "YOUR-USERNAME/YOUR-REPOSITORY",
|
||||
Path: "",
|
||||
GitSuffix: ".git",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tc := range testcases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user