You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/cluster-version-operator-tests/README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,48 @@ The output looks nicer this way.
43
43
44
44
See [docs](https://github.com/openshift/origin/tree/main/test/extended#test-labels) for details.
45
45
46
+
### Migrating from Custom Tags
47
+
48
+
When migrating cvo tests from [openshift-tests-private](https://github.com/openshift/openshift-tests-private/blob/main/test/extended/ota/cvo/cvo.go) that use custom-defined tags (based on OTP naming rule), use the following mapping to align with upstream test label conventions:
49
+
50
+
| Custom Tag | Action | Reason | New Label |
51
+
|------------|--------|--------|-----------|
52
+
|`NonPreRelease`| Drop | CI-scheduling concern, handled by job config in openshift-e2e-test, not by in-name tags | (none) |
53
+
|`Longduration`| Replace | Upstream equivalent is `[Slow]` (test >5 min). Add `[Slow]` if not already present |`[Slow]`|
54
+
|`ConnectedOnly`| Drop | Infrastructure constraint, not a test label. Handle via programmatic skip in test code (e.g., check connectivity and `g.Skip()`) | (runtime skip) |
55
+
|`NonHyperShiftHOST`| Drop | Topology constraint, not a test label. Handle via programmatic skip in test code (e.g., detect HyperShift and `g.Skip()`) | (runtime skip) |
56
+
|`[Serial]`| Keep | Standard upstream label |`[Serial]`|
57
+
|`[Slow]`| Keep | Standard upstream label |`[Slow]`|
58
+
|`[Disruptive]`| Keep | Standard upstream label (implies `[Serial]`) |`[Disruptive]`|
59
+
60
+
**Note**:
61
+
- For infrastructure and topology constraints like `ConnectedOnly` and `NonHyperShiftHOST`, implement runtime skips like [utility functions](https://github.com/openshift/cluster-version-operator/blob/f25054a5800a34e3fd596b5d9a2c6c1bb5f5f628/test/cvo/cvo.go#L63-L66) to detect cluster type and skip appropriately.
62
+
- The custom `author`, `priority`, and `caseID` fields are not migrated as they are not standard upstream labels.
63
+
64
+
#### Handling Dropped Fields
65
+
66
+
If we need to organize tests in ways that the standard test suites don't support, we can use Ginkgo labels to create custom test suites.
67
+
68
+
To create a custom test suite based on labels:
69
+
70
+
1.**Define the suite** in [main.go](main.go) by adding an `ext.AddSuite()` call with CEL qualifiers:
2.**Label the tests** using `g.Label()` in the test definitions:
81
+
```go
82
+
g.It("should do something", g.Label("characteristicA"), func(ctx g.SpecContext) {
83
+
// test code
84
+
})
85
+
```
86
+
87
+
46
88
### Ownership
47
89
48
90
* 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.
0 commit comments