Problem
The suite key in integration-suites currently serves two purposes:
- The unique suite identifier (used as the spread suite name and as the
build/<key>/run/task.yaml path)
- The filesystem path used for test auto-discovery
This makes it impossible to run the same set of tests twice with different environments (e.g. juju 3.6 and juju 4) within a single integration-suites block, since YAML keys must be unique.
Proposed solution
Add an optional discover-path: key to integration-suites entries. When set, opcli uses it for test discovery instead of the suite key. The suite key remains just a unique identifier (and a valid filesystem path for build/<key>/run/task.yaml generation).
Example
integration-suites:
tests/integration/:
cwd: ./
summary: integration tests on juju 3.6
backends:
- integration-test
tests/integration/juju4/:
discover-path: tests/integration/
discover-pattern: "*_jubilant.py"
cwd: ./
summary: jubilant tests on juju 4
backends:
- integration-test
environment:
CONCIERGE: concierge-juju4.yaml
Here tests/integration/juju4/ does not need to exist on disk — it's just a unique suite name. opcli discovers tests from discover-path instead.
Context
Encountered while adding juju 4 variants for jubilant integration tests in traefik-k8s-operator. The current workaround is to use manual MODULE/ variants, which partially works but loses the benefit of auto-discovery and requires keeping variant names in sync with test files.
Problem
The suite key in
integration-suitescurrently serves two purposes:build/<key>/run/task.yamlpath)This makes it impossible to run the same set of tests twice with different environments (e.g. juju 3.6 and juju 4) within a single
integration-suitesblock, since YAML keys must be unique.Proposed solution
Add an optional
discover-path:key tointegration-suitesentries. When set, opcli uses it for test discovery instead of the suite key. The suite key remains just a unique identifier (and a valid filesystem path forbuild/<key>/run/task.yamlgeneration).Example
Here
tests/integration/juju4/does not need to exist on disk — it's just a unique suite name. opcli discovers tests fromdiscover-pathinstead.Context
Encountered while adding juju 4 variants for jubilant integration tests in traefik-k8s-operator. The current workaround is to use manual
MODULE/variants, which partially works but loses the benefit of auto-discovery and requires keeping variant names in sync with test files.