Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1872080: add new okd e2e to validate okd vs. ocp content is installed #318

Merged
merged 1 commit into from
Aug 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ test-unit:
test-e2e:
KUBERNETES_CONFIG=${KUBECONFIG} go test -parallel 1 -timeout 30m -v ./test/e2e/...

test-e2e-okd:
OKD=yes KUBERNETES_CONFIG=${KUBECONFIG} go test -parallel 1 -timeout 30m -v ./test/e2e/...

clean:
rm -f cluster-samples-operator
rm -rf _output/
Expand Down
7 changes: 6 additions & 1 deletion test/e2e/cluster_samples_operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,13 @@ func getContentDir(t *testing.T) string {
startDir = filepath.Dir(startDir)
}
contentDir := ""
suffix := "ocp-x86_64"
_, present := os.LookupEnv("OKD")
if present {
suffix = "okd-x86_64"
}
_ = filepath.Walk(startDir, func(path string, info os.FileInfo, err error) error {
if strings.HasSuffix(strings.TrimSpace(path), "ocp-x86_64") {
if strings.HasSuffix(strings.TrimSpace(path), suffix) {
contentDir = path
return fmt.Errorf("found contentDir %s", contentDir)
}
Expand Down