Skip to content

Commit 7f5483c

Browse files
committed
chore(doc): updated testing documentation
Signed-off-by: Rostislav Lán <[email protected]> Assisted-by: Cursor
1 parent a68fd74 commit 7f5483c

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,37 @@ To add this additional configuration (excluding the patches, since the patch fil
115115
- Inside `plugins/`, create one folder per plugin you wish to enhance with additional information
116116

117117
### 3. Test the OCI image against an RHDH instance
118+
119+
Plugin testing can be performed automatically via CI workflows or manually in your own RHDH environment.
120+
121+
#### Automatic Testing
122+
123+
The repository includes an automated integration testing workflow that verifies plugins load correctly in RHDH.
124+
125+
**Prerequisites:**
126+
- PR must touch exactly one workspace
127+
- Each plugin must have its own metadata file in `workspaces/<modified_workspace>/metadata/`
128+
129+
**Triggering tests:**
130+
- After `/publish`: Tests run automatically upon successful publish completion
131+
- Manual testing: Use `/test` comment on the PR to rerun the tests using the latest published artifacts
132+
- For `/test` command, a previous successful `/publish` run is required
133+
134+
**Testing workflow steps:**
135+
1. **Resolve metadata**: Retrieves published OCI references and PR metadata from the `published-exports` artifact
136+
2. **Prepare test config**: Generates `dynamic-plugins.test.yaml` from plugin metadata and copies other configuration files (`tests/app-config.yaml` and workspace-specific `app-config.test.yaml`, `test.env`)
137+
3. **Run integration tests**: Starts RHDH container with layered configuration, installs dynamic plugins from OCI artifacts, and verifies each plugin loads successfully
138+
4. **Report results**: Posts test status as a commit status check and PR comment with pass/fail results and links to the workflow run
139+
140+
- **Results** are reported via PR comment and in the status check. The complete container logs are also available, in the `integration-tests/run` step.
141+
142+
#### Manual Testing
143+
118144
- To trigger a build of the OCI image for the plugins in a PR, comment: `/publish`.
119-
- This runs a GitHub workflow to build and publish **test OCI artifacts**. A bot will comment with the generated OCI image references, tagged as `<pr_number>_<plugin_version>`, and may also include a list of plugins for which the generation failed.
145+
- This runs a GitHub workflow to build and publish **test OCI artifacts**. A bot will comment with the generated OCI image references, tagged as `pr_<pr_number>__<plugin_version>`, and may also include a list of plugins for which the generation failed.
146+
- Use these OCI references to manually test the plugins in your own RHDH instance.
120147
- If you cannot test the generated images immediately, a good practice is to label the PR with `help wanted to test`.
121148

122149
#### Once Testing Is Complete:
123-
- If the plugin works with your RHDH instance, **change the label** to `tested`
150+
- If the plugin works with RHDH (either via automatic or manual testing), **change the label** to `tested`
124151
- Once the PR is merged, the final OCI artifact will be published with the tag: `bs_<backstage_version>__<plugin_version>`

0 commit comments

Comments
 (0)