-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved content for Retriggering integration tests for upstream
- Loading branch information
1 parent
b96547a
commit 36d5a2c
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 58 additions & 1 deletion
59
docs/modules/ROOT/pages/how-tos/testing/integration/rerunning.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,58 @@ | ||
= Rerunning an integration test | ||
= Retriggering Integration Tests | ||
|
||
Integration test scenarios for a given snapshot can be re-triggered by adding a label to the snapshot. | ||
|
||
.Prerequisites | ||
- You have a snapshot that has completed all its initial tests. All initial tests must be finished before you trigger subsequent tests. | ||
- The snapshot for which tests will be retriggered has completed its initial tests. | ||
- 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]. | ||
.Procedure | ||
|
||
. 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: | ||
|
||
+ | ||
image::snapshot.png[role="border" alt="IntegrationTestScenario Snapshot"] | ||
|
||
. Label the snapshot with `test.appstudio.openshift.io/run`, assigning the scenario name you wish to rerun as its value. | ||
|
||
+ | ||
[source] | ||
---- | ||
$ kubectl label snapshot [snapshot name] test.appstudio.openshift.io/run=[scenario name] | ||
---- | ||
|
||
. 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. | ||
|
||
+ | ||
[source] | ||
---- | ||
$ tkn pipelinerun list | ||
[Example Output] | ||
NAME STARTED DURATION STATUS | ||
integration-pipelinerun-jfrdb 4 seconds ago --- Running | ||
---- | ||
|
||
.Verification | ||
|
||
. 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. | ||
|
||
+ | ||
[source] | ||
---- | ||
$ tkn pipelinerun describe integration-pipelinerun-jfrdb | ||
[Expected labels in the output] | ||
Name: integration-pipelinerun-jfrdb | ||
Namespace: default | ||
Service Account: appstudio-pipeline | ||
Labels: | ||
... | ||
appstudio.openshift.io/snapshot=snapshot-sample | ||
... | ||
test.appstudio.openshift.io/test=component | ||
... | ||
---- |