Skip to content

Commit

Permalink
Merge pull request #719 from test-network-function/helm_safeguards
Browse files Browse the repository at this point in the history
Add helm validation and change vault repo
  • Loading branch information
sebrandon1 authored Apr 8, 2024
2 parents 9cfc978 + 8f9dafd commit d9c8ffc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 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 @@ -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 d9c8ffc

Please sign in to comment.