-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add helmtest for dp-terraform testing
- Loading branch information
Showing
3 changed files
with
67 additions
and
19 deletions.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package test | ||
|
||
import ( | ||
"testing" | ||
|
||
. "github.com/onsi/gomega" | ||
"github.com/stackrox/acs-fleet-manager/pkg/shared" | ||
helmTest "github.com/stackrox/helmtest/pkg/framework" | ||
"helm.sh/helm/v3/pkg/chart/loader" | ||
"helm.sh/helm/v3/pkg/chartutil" | ||
) | ||
|
||
func TestWithHelmtest(t *testing.T) { | ||
chartDir := shared.BuildFullFilePath("./dp-terraform/helm/rhacs-terraform") | ||
suite, err := helmTest.NewLoader(chartDir).LoadSuite() | ||
Expect(err).ToNot(HaveOccurred(), "failed to load helmtest suite") | ||
|
||
ch, err := loader.LoadDir(chartDir) | ||
Expect(err).ToNot(HaveOccurred(), "failed to load chart") | ||
target := &helmTest.Target{ | ||
Chart: ch, | ||
ReleaseOptions: chartutil.ReleaseOptions{ | ||
Name: "rhacs-terraform", | ||
Namespace: "rhacs", | ||
IsInstall: true, | ||
}, | ||
} | ||
|
||
suite.Run(t, target) | ||
} |
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
Oops, something went wrong.