-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Description
We currently repeat the same image replacement code for the scorecard-test image in three places:
operator-sdk/test/e2e-go/e2e_go_suite_test.go
Lines 109 to 118 in 40e00a3
testutils.ReplaceRegexInFile( filepath.Join(tc.Dir, "config", "scorecard", "patches", "basic.config.yaml"), "quay.io/operator-framework/scorecard-test:.*", "quay.io/operator-framework/scorecard-test:dev", ) testutils.ReplaceRegexInFile( filepath.Join(tc.Dir, "config", "scorecard", "patches", "olm.config.yaml"), "quay.io/operator-framework/scorecard-test:.*", "quay.io/operator-framework/scorecard-test:dev", ) operator-sdk/test/e2e-ansible/e2e_ansible_suite_test.go
Lines 107 to 116 in 40e00a3
testutils.ReplaceRegexInFile( filepath.Join(tc.Dir, "config", "scorecard", "patches", "basic.config.yaml"), "quay.io/operator-framework/scorecard-test:.*", "quay.io/operator-framework/scorecard-test:dev", ) testutils.ReplaceRegexInFile( filepath.Join(tc.Dir, "config", "scorecard", "patches", "olm.config.yaml"), "quay.io/operator-framework/scorecard-test:.*", "quay.io/operator-framework/scorecard-test:dev", ) operator-sdk/test/e2e-helm/e2e_helm_suite_test.go
Lines 100 to 109 in 40e00a3
testutils.ReplaceRegexInFile( filepath.Join(tc.Dir, "config", "scorecard", "patches", "basic.config.yaml"), "quay.io/operator-framework/scorecard-test:.*", "quay.io/operator-framework/scorecard-test:dev", ) testutils.ReplaceRegexInFile( filepath.Join(tc.Dir, "config", "scorecard", "patches", "olm.config.yaml"), "quay.io/operator-framework/scorecard-test:.*", "quay.io/operator-framework/scorecard-test:dev", )
We should centralize this into a shared utility function in ./test/internal/
, (perhaps rename scorecard-custom-patch.go
to scorecard.go
and add it there?)
camilamacedo86
Metadata
Metadata
Assignees
Labels
good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.