Skip to content

Commit

Permalink
Add helm validation and change vault repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sebrandon1 committed Apr 8, 2024
1 parent 9cfc978 commit 142eb70
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ var _ = Describe("Affiliated-certification helm-version,", Serial, func() {
Skip("helm does not exist please install it to run the test.")
}

By("Check that helm version is v3")
cmd = exec.Command("/bin/bash", "-c",
"helm version --short | grep v3")
err = cmd.Run()
if err != nil {
Fail("Helm version is not v3")
}

By("Start test")
err = globalhelper.LaunchTests(
tsparams.TestHelmVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var _ = Describe("Affiliated-certification helm chart certification,", Serial, f
globalhelper.AfterEachCleanupWithRandomNamespace(randomNamespace, randomReportDir, randomTnfConfigDir, tsparams.Timeout)
})

It("One helm to test, are certified", func() {
FIt("One helm to test, are certified", func() {
if globalhelper.IsKindCluster() {
Skip("Skipping helm chart test on Kind cluster")
}
Expand All @@ -47,16 +47,24 @@ var _ = Describe("Affiliated-certification helm chart certification,", Serial, f
Skip("helm does not exist please install it to run the test.")
}

By("Check that helm version is v3")
cmd = exec.Command("/bin/bash", "-c",
"helm version --short | grep v3")
err = cmd.Run()
if err != nil {
Fail("Helm version is not v3")
}

By("Add openshift-helm-charts repo")
cmd = exec.Command("/bin/bash", "-c",
"helm repo add openshift-helm-charts https://charts.openshift.io/ --force-update "+
"helm repo add hashicorp https://helm.releases.hashicorp.com --force-update "+
"&& helm repo update")
err = cmd.Run()
Expect(err).ToNot(HaveOccurred(), "Error adding openshift-helm-carts repo")

By("Install helm chart")
cmd = exec.Command("/bin/bash", "-c",
"helm install example-vault1 openshift-helm-charts/hashicorp-vault -n "+randomNamespace)
"helm install example-vault1 hashicorp/vault -n "+randomNamespace)
err = cmd.Run()
Expect(err).ToNot(HaveOccurred(), "Error installing hashicorp-vault helm chart")

Expand Down Expand Up @@ -108,6 +116,14 @@ var _ = Describe("Affiliated-certification helm chart certification,", Serial, f
Skip("helm does not exist please install it to run the test.")
}

By("Check that helm version is v3")
cmd = exec.Command("/bin/bash", "-c",
"helm version --short | grep v3")
err = cmd.Run()
if err != nil {
Fail("Helm version is not v3")
}

By("Create istio-system namespace")
err = globalhelper.CreateNamespace("istio-system")
Expect(err).ToNot(HaveOccurred(), "Error creating istio-system namespace")
Expand Down

0 comments on commit 142eb70

Please sign in to comment.