Skip to content

Commit c89cc09

Browse files
committed
Moved content for Retriggering integration tests for upstream
1 parent b96547a commit c89cc09

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed
Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,57 @@
1-
= Rerunning an integration test
1+
= Retriggering Integration Tests
2+
3+
Integration test scenarios for a given snapshot can be re-triggered by adding a label to the snapshot.
4+
5+
.Prerequisites
6+
- You have a snapshot that has completed all its initial tests. All initial tests must be finished before you trigger subsequent tests.
7+
8+
- The snapshot for which tests will be retriggered has completed its initial tests.
9+
10+
- You have CLI access to the specific OpenShift cluster. For information on obtaining CLI access, refer Getting started.
11+
12+
- You have an up-to-date kubectl binary. Alternatively, the `oc` binary is also compatible.
13+
14+
.Procedure
15+
16+
. Identify the IntegrationTestScenario that needs to be rerun. For a given snapshot, you can only rerun one IntegrationTestScenario.
17+
18+
. Label the snapshot with `test.appstudio.openshift.io/run`, assigning the scenario name you wish to rerun as its value.
19+
20+
+
21+
[source]
22+
----
23+
$ kubectl label snapshot [snapshot name] test.appstudio.openshift.io/run=[scenario name]
24+
----
25+
26+
. The tests are re-triggered automatically. Once they are re-triggered, the system removes the label, allowing you to apply a new label for a different scenario if you wish to test multiple scenarios.
27+
28+
+
29+
[source]
30+
----
31+
$ tkn pipelinerun list
32+
33+
[Example Output]
34+
NAME STARTED DURATION STATUS
35+
integration-pipelinerun-jfrdb 4 seconds ago --- Running
36+
----
37+
38+
.Verification
39+
40+
. To verify the tests, run `tkn pipelinerun describe [pipelinerun]` and ensure that the labels `appstudio.openshift.io/snapshot` and `test.appstudio.openshift.io/scenario` reference the correct snapshot and scenario.
41+
42+
+
43+
[source]
44+
----
45+
$ tkn pipelinerun describe integration-pipelinerun-jfrdb
46+
47+
[Expected labels in the output]
48+
Name: integration-pipelinerun-jfrdb
49+
Namespace: default
50+
Service Account: appstudio-pipeline
51+
Labels:
52+
...
53+
appstudio.openshift.io/snapshot=snapshot-sample
54+
...
55+
test.appstudio.openshift.io/test=component
56+
...
57+
----

0 commit comments

Comments
 (0)