-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Yash Sethiya <[email protected]>
- Loading branch information
Yash Sethiya
authored and
Yash Sethiya
committed
Jan 25, 2024
1 parent
4a9d900
commit 57c820a
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ func Test_GitURL_skipsTLS(t *testing.T) { | |
Namespace: "default", | ||
}, | ||
Data: map[string]string{ | ||
"dangerousSkipTLSVerify": "github.com, gitlab.com, hostname.com", | ||
"dangerousSkipTLSVerify": "github.com, gitlab.com, hostname.com, 0.0.0.0", | ||
}, | ||
} | ||
k8scs := k8sfake.NewSimpleClientset(configMap) | ||
|
@@ -84,6 +84,7 @@ func Test_GitURL_skipsTLS(t *testing.T) { | |
{"https://gitlab.com/bitnami/charts/", true}, | ||
{"ssh://[email protected]:/path/to/repo.git", true}, | ||
{"https://bitbucket.org/bitnami/charts/", false}, | ||
{"https://0.0.0.0/bitnami/charts/", true}, | ||
} | ||
for i, tc := range testCases { | ||
err = vendir.AddDir(v1alpha1.AppFetch{ | ||
|
@@ -93,6 +94,8 @@ func Test_GitURL_skipsTLS(t *testing.T) { | |
assert.NoError(t, err) | ||
|
||
vConf := vendir.Config() | ||
t.Logf("%+v", vConf) | ||
t.Logf("%+v", vConf.Directories[i].Contents[0].Git) | ||
assert.Equal(t, i+1, len(vConf.Directories), "Failed on iteration %d", i) | ||
assert.Equal(t, tc.shouldSkipTLS, vConf.Directories[i].Contents[0].Git.DangerousSkipTLSVerify, "Failed with URL %s", tc.URL) | ||
} | ||
|