JanssenProject / JanssenProject/jans
terraform-provider AIO tests: 7 known-environmental acceptance failures
- Dominant language
- Java
- Stars
- 648
- Forks
- 174
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 110
Description
## Context
[#14355](https://github.com/JanssenProject/jans/pull/14355) added `.github/workflows/test-terraform-provider.yml`, which stands up an AIO instance and runs the Terraform provider acceptance tests against it (MYSQL + PGSQL), uploading results like the integration workflow.
The pipeline is green except for **7 acceptance failures that are environmental / AIO-capability gaps, not provider regressions** — they fail identically on both backends and would fail on `main` too. The PR was merged with these known-failing; this issue tracks resolving them so the gate can go fully green.
## Failing tests (identical on MYSQL + PGSQL)
1. **`jans_asset`** — config-api returns *"Service not implemented"* in the AIO build (asset service unavailable).
2. **`data_source_agama_repository`**, **`data_source_agama_syntax_check`** — these endpoints need Agama Lab runtime/config not present in the AIO.
3. **`data_source_audit_logs`** and one **`*_configuration`** data source — endpoint/feature not enabled in the AIO build.
4. **`client_authorizations`** — the provisioned test client lacks the `https://jans.io/oauth/client/authorizations.write` scope (a non-config-api scope namespace, not in the config-api scope set); the endpoint also returns not-found.
5. **`oidc_client`** create round-trip — the test hardcodes an inum (`1201.d523…`) that collides with the AIO's seeded *"SCIM client"*; the test should use a unique/server-assigned inum.
6. **`attribute`** POST → **500** — server-side error creating a custom attribute (no clean stack in the per-service jetty logs; likely AIO/data-specific).
## Suggested resolutions
- Enable the missing config-api features/plugins in the AIO test image (asset, agama, audit), or `t.Skip` those tests when the endpoint is unavailable.
- Grant the provisioned test client the `client/authorizations.write` scope (extend `run_aio_for_tf.sh`), or skip when absent.
- Fix the `oidc_client` test to not hardcode an inum.
- Investigate the attribute-create 500 against the AIO (per-service logs are now in the `aio-logs-*` artifacts).
## Notes
The provider-side issues surfaced by this workflow were already fixed in #14355 (auth/credential resolution, Terraform CLI install, `health.go` missing `/jans-config-api` prefix, `persistence_type` inference, the removed script `LocationType="file"` enum, `TZ=UTC`).
Contributor guide
Research direction
Start with .github/workflows/test-terraform-provider.yml and the named acceptance tests to reproduce the seven failures against both MYSQL and PGSQL AIO instances. Read run_aio_for_tf.sh for test-client scopes and inspect the aio-logs-* artifacts for the attribute 500. Done means the affected tests pass or are conditionally skipped for unavailable AIO capabilities, without masking provider regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, shell, terraform
- Domain
- ci-cd, infrastructure, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100