Skip to content

Commit 17e259d

Browse files
authored
Merge pull request #29 from gtrivedi88/HACDOCS-927
Moved content for Retriggering integration tests for upstream
2 parents b7d7403 + f91518b commit 17e259d

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

antora-lunr-ui/css/main.css

+6
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,9 @@ aside.toc.sidebar {
140140
.popup:hover .popuptext {
141141
visibility: visible;
142142
}
143+
144+
.border {
145+
border: 1px solid #000;
146+
padding: 5px;
147+
border-radius: 5px;
148+
}

docs/modules/ROOT/images/snapshot.png

32.4 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -1 +1,61 @@
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 link:https://konflux-ci.dev/docs/getting-started/cli/[Getting started with the CLI].
11+
12+
.Procedure
13+
14+
. Identify the IntegrationTestScenario that needs to be rerun. For a given snapshot, you can only rerun one IntegrationTestScenario. The related snapshot can be found on the pipelineRun details page in the UI, as shown in the example below:
15+
16+
+
17+
image::snapshot.png[role="border" alt="IntegrationTestScenario Snapshot"]
18+
19+
. Label the snapshot with `test.appstudio.openshift.io/run`, assigning the scenario name you wish to rerun as its value.
20+
21+
+
22+
[source]
23+
----
24+
$ kubectl label snapshot [snapshot name] test.appstudio.openshift.io/run=[scenario name]
25+
----
26+
27+
. 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.
28+
29+
+
30+
[source]
31+
----
32+
$ tkn pipelinerun list
33+
34+
[Example Output]
35+
NAME STARTED DURATION STATUS
36+
integration-pipelinerun-jfrdb 4 seconds ago --- Running
37+
----
38+
39+
+
40+
NOTE: This command is used to verify that a re-triggered integration pipelineRun has started. If you run this command long after the re-trigger command, it may not show any output because pipelineRun resources are pruned after completion. Additionally, the command may display other unrelated pipelineRuns that are in progress at the same time.
41+
42+
.Verification
43+
44+
. 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.
45+
46+
+
47+
[source]
48+
----
49+
$ tkn pipelinerun describe integration-pipelinerun-jfrdb
50+
51+
[Expected labels in the output]
52+
Name: integration-pipelinerun-jfrdb
53+
Namespace: default
54+
Service Account: appstudio-pipeline
55+
Labels:
56+
...
57+
appstudio.openshift.io/snapshot=snapshot-sample
58+
...
59+
test.appstudio.openshift.io/test=component
60+
...
61+
----

0 commit comments

Comments
 (0)