-
Notifications
You must be signed in to change notification settings - Fork 209
NO-JIRA: Clarify test names in OTE #1256
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -21,4 +21,40 @@ After [installing-ginkgo](https://onsi.github.io/ginkgo/#installing-ginkgo): | |||||
| $ ginkgo ./test/... | ||||||
| ``` | ||||||
|
|
||||||
| The output looks nicer this way. | ||||||
| The output looks nicer this way. | ||||||
|
|
||||||
|
|
||||||
| ## Test Names | ||||||
|
|
||||||
| ### Test labels | ||||||
|
|
||||||
| See [docs](https://github.com/openshift/origin/tree/main/test/extended#test-labels) for details. | ||||||
|
|
||||||
| ### Ownership | ||||||
|
|
||||||
| * A `[Jira:"Component"]` tag in the test name (e.g., [Jira:"Cluster Version Operator"]) is preferred to claim the ownership of the test. The component comes from [the list of components of Jira Project OCPBUGS](https://issues.redhat.com/projects/OCPBUGS?selectedItem=com.atlassian.jira.jira-projects-plugin:components-page). See [here](https://github.com/openshift/origin/blob/6b584254d53cdd1b5cd6471b69cb7c22f3e28ecd/test/extended/apiserver/rollout.go#L36) for example. | ||||||
|
|
||||||
| * Or an entry in the [ci-test-mapping](https://github.com/openshift-eng/ci-test-mapping) repository, which maps tests to owning components. See [here](https://github.com/openshift-eng/ci-test-mapping/tree/main/pkg/components/clusterversionoperator) for example. | ||||||
|
|
||||||
| ### Renaming | ||||||
|
|
||||||
| If a test is renamed, claim it with [specs.Walk](https://pkg.go.dev/github.com/openshift-eng/[email protected]/pkg/extension/extensiontests#ExtensionTestSpecs.Walk): | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
|
|
||||||
| ```go | ||||||
| specs = specs.Walk(func(spec *et.ExtensionTestSpec) { | ||||||
| if orig, ok := renamedTests[spec.Name]; ok { | ||||||
| spec.OriginalName = orig | ||||||
| } | ||||||
| }) | ||||||
| ``` | ||||||
|
|
||||||
| ### Deleting | ||||||
|
|
||||||
| If a test is renamed, claim it with [ext.IgnoreObsoleteTests](https://pkg.go.dev/github.com/openshift-eng/[email protected]/pkg/extension#Extension.IgnoreObsoleteTests) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
|
|
||||||
| ```go | ||||||
| ext.IgnoreObsoleteTests( | ||||||
| "[sig-abc] My removed test", | ||||||
| // Add more removed test names below | ||||||
| ) | ||||||
| ``` | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,4 +5,8 @@ set -eu | |
| source hack/build-info.sh | ||
|
|
||
| # Update test metadata | ||
| eval "${BIN_PATH}/cluster-version-operator-tests" "update" | ||
| if ! "${BIN_PATH}/cluster-version-operator-tests" "update"; then | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment not related to the code We can break down the commit into two distinct commits as the current commit updates the README and also de facto updates the default logic of the |
||
| >&2 echo "run 'make update' to fix the metadata after going through the teest renaming process. | ||
| See https://github.com/openshift/cluster-version-operator/blob/main/cmd/cluster-version-operator-tests/README.md#test-names for details." | ||
|
Comment on lines
+9
to
+10
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the OTE enhancement update section:
Thus, it may not be just a renaming issue. Personally, I would make the message more general in nature; however, we can still reference the README file that can contain additional help. |
||
| exit 1 | ||
| fi | ||


Uh oh!
There was an error while loading. Please reload this page.