@@ -21,6 +21,14 @@ import (
2121 "sigs.k8s.io/yaml"
2222)
2323
24+ // Those tests are specifically targeting one feature of go-getter, namely cloning of git
25+ // repositories using HTTPS. That is, because TLS certificates are only used in HTTPS URLs, not if
26+ // SSH keys are used to clone those repositories. Since go-getter shells out to the `git` CLI for
27+ // cloning git repositories, the configuration of TLS certificates or ignoring those needs to be
28+ // configured with `git` typical environment variables. Those are the tests for that implementation.
29+ // For go-getter to be used, the `helm.chart` field in `fleet.yaml` needs to point to a URL that
30+ // tells go-getter to use the git protocol over HTTPS. Such an URL is prefixed with `git::https://`.
31+ // The contents fetched from those repositories are expected to be helm charts.
2432var _ = Describe ("Testing go-getter CA bundles and insecureSkipVerify for cloning git repositories" , Label ("infra-setup" ), func () {
2533 const (
2634 sleeper = "sleeper"
@@ -150,7 +158,7 @@ var _ = Describe("Testing go-getter CA bundles and insecureSkipVerify for clonin
150158 Expect (err ).ToNot (HaveOccurred ())
151159 cloneDir = path .Join (tmpDir , "repo" ) // Fixed and built into the container image.
152160 gitrepoName = testenv .RandomFilename ("gitjob-test" , r )
153- // Creates the content in the sleeperClusterName directory
161+ // Creates the content in the sleeper directory
154162 _ , err = gh .Create (cloneDir , testenv .AssetPath ("gitrepo/sleeper-chart" ), sleeper )
155163 Expect (err ).ToNot (HaveOccurred ())
156164
@@ -257,21 +265,6 @@ var _ = Describe("Testing go-getter CA bundles and insecureSkipVerify for clonin
257265 createGitRepo (gitRepoOptions {HelmSecretNameForPaths : secretName })
258266 Consistently (expectGitRepoToNotBeReady ).Should (Succeed ())
259267 })
260-
261- It ("should succeed when using a correct CA bundle provided in helmSecretNameForPath" , func () {
262- secretName := "helm-ca-bundle-by-path-" + gitrepoName
263- createHelmSecretForPaths (
264- secretName ,
265- AuthConfigByPath {
266- entrypoint : {
267- CABundle : mustReadFileAsBase64 (getCertificateFilePath ()),
268- },
269- },
270- )
271-
272- createGitRepo (gitRepoOptions {HelmSecretNameForPaths : secretName })
273- Eventually (expectGitRepoToBeReady ).Should (Succeed ())
274- })
275268 })
276269
277270 When ("testing ignoring insecure certificates for cloning git repositories with HTTPS using go-getter (fleet.yaml)" , func () {
0 commit comments