Skip to content

Commit df2bcbd

Browse files
ci(tests): run the Keycloak features suite in E2E Suites
Add a matrix row for features/keycloak on ubuntu-docker-rootful-keycloak, include the Keycloak realm in the tmachine disk cache key, and document environments that provide services in TESTING.md. Signed-off-by: Matthew Grossman <[email protected]>
1 parent 7adbd3d commit df2bcbd

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

‎.github/workflows/e2e-suites.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ jobs:
4848
family: conformance
4949
package: sandbox
5050
runner: ubuntu-24.04
51+
- environment: ubuntu-docker-rootful-keycloak
52+
installer: deb
53+
family: features
54+
package: keycloak
55+
runner: ubuntu-24.04
5156
runs-on: ${{ matrix.runner }}
5257
timeout-minutes: 90
5358
steps:
@@ -77,7 +82,7 @@ jobs:
7782
# actions/cache doesn't save after an exact key hit, so a fixed key
7883
# would rebuild the changed layers on every run. Key on the playbooks
7984
# and fall back to the newest entry for the same runner.
80-
key: tmachine-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('tests/tmachine/ansible/**', 'tests/tmachine/images.nix') }}
85+
key: tmachine-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('tests/tmachine/ansible/**', 'tests/tmachine/images.nix', 'scripts/keycloak-realm.json') }}
8186
restore-keys: |
8287
tmachine-${{ runner.os }}-${{ runner.arch }}-
8388

‎TESTING.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,24 @@ an explicit matrix and runs the runner once per row. Branch E2E calls it when
204204
the `test:e2e` label is set. It is advisory for now. To run a suite in another
205205
environment on CI, add a row.
206206

207+
**Environments with services.** A suite that needs something besides the
208+
gateway, such as an OIDC issuer, runs in a tmachine environment that provides
209+
it. The environment's setup starts the service (with a restart policy, since
210+
setup is cached as a disk) and writes how to reach it as `OPENSHELL_TEST_*`
211+
lines in `/etc/openshell-test/env.d/<service>.env`. The runner passes those
212+
variables to the tests and rejects names without that prefix. A suite-local
213+
fixture reads them with plain environment variables, so you can run the suite
214+
against your own deployment by setting them yourself. See the
215+
`ubuntu-docker-rootful-keycloak` environment in `tests/tmachine/config.nix`,
216+
`tests/tmachine/ansible/playbooks/keycloak.yaml` and
217+
`tests/suites/features/keycloak`:
218+
219+
```shell
220+
nix run .#openshell-test-runner -- \
221+
--environment ubuntu-docker-rootful-keycloak --installer deb \
222+
--family features --package keycloak
223+
```
224+
207225
The older conformance, feature and driver lanes in `.github/workflows/` still
208226
run through the tmachine testsuites in `tests/tmachine/config.nix`. They move
209227
to the runner as their suites move to testkit.

0 commit comments

Comments
 (0)