File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -108,15 +108,18 @@ These tests are written with the [Ginkgo/Gomega test frameworks](https://github.
108
108
- It modifies cluster-scoped resources, such as ` ClusterRoles ` /` ClusterRoleBindings ` , or ` Namespaces ` that are shared between tests
109
109
- More generally, if it writes to a K8s resource that is used by another test.
110
110
- ` parallel ` : Tests that are safe to run in parallel with other tests
111
- - A test is safe to run in paralel if it does not have any of the above problematic behaviours.
111
+ - A test is safe to run in parallel if it does not have any of the above problematic behaviours.
112
112
- It is fine for a parallel test to read cluster-scoped resources (such as resources in openshift-gitops namespace)
113
- - A parallel test should NEVER write to resources that may be shared with other tests (Subscriptions, some cluster-scoped resources, etc.)
113
+ - A parallel test should NEVER write to resources that may be shared with other tests (` Subscriptions ` , some cluster-scoped resources, etc.)
114
114
115
115
116
116
117
117
### Test fixture:
118
118
- Utility functions for writing tests can be found within the ` fixture/ ` folder.
119
119
- ` fixture/fixture.go ` contains utility functions that are generally useful to writing tests.
120
+ - Most important are:
121
+ - ` EnsureParallelCleanSlate ` : Should be called at the beginning of every parallel test.
122
+ - ` EnsureSequentialCleanSlate ` : Should be called at the beginning of every sequential test.
120
123
- ` fixture/(name of resource) ` contains functions that are specific to working with a particular resource.
121
124
- For example, if you wanted to wait for an ` Application ` CR to be Synced/Healthy, you would use the functions defined in ` fixture/application ` .
122
125
- Likewise, if you want to check a ` Deployment ` , see ` fixture/deployment ` .
You can’t perform that action at this time.
0 commit comments