Skip to content

Commit f48e903

Browse files
authored
Merge pull request #156 from dirgim/add-disabled-context
docs: improve the integration context document
2 parents 6891014 + 58c4ae0 commit f48e903

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/modules/ROOT/pages/how-tos/testing/integration/choosing-contexts.adoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ The full list of supported contexts is:
1313
* “push” - runs the integration test in case of the Snapshot being created for a `push` event
1414
* "override” - runs the integration test for an `override` Snapshot
1515
** See more in xref:how-tos/testing/integration/override-snapshots.adoc[Creating an override snapshot]
16+
* "disabled" - disables the execution of the given integration test if it's the only context that's defined
17+
** This can be useful if the scenario in question needs to only be executed manually, see more about running
18+
integration tests manually in xref:how-tos/testing/integration/rerunning.adoc[Rerunning an integration test]
1619
1720
+
1821
NOTE: When multiple contexts are defined, the IntegrationTestScenario will execute if any of the specified contexts match the snapshot. This approach ensures that the test runs as long as at least one context applies, without requiring all defined contexts to be met.
@@ -33,8 +36,10 @@ $ kubectl edit integrationtestscenario [integrationtestscenario name]
3336
----
3437

3538
. Modify the `contexts` field by setting the list of contexts you wish the IntegrationTestScenario.
39+
.. The `name` field of every entry needs to be set to the chosen context name from the above list
40+
.. The `description` can be used to note down why this context is set for the given IntegrationTestScenario
3641
+
37-
Example integrationTestScenario configuration with the pull_request context:
42+
Example integrationTestScenario configuration with the single component context for the Component named `sample-component`:
3843

3944
+
4045
[source,yaml]
@@ -47,8 +52,8 @@ metadata:
4752
spec:
4853
application: application-sample
4954
contexts:
50-
- description: PR testing
51-
name: pull_request
55+
- description: Single component testing
56+
name: component_sample-component
5257
resolverRef:
5358
resolver: git
5459
params:

0 commit comments

Comments
 (0)