Skip to content

tests: Add provisioned-environment E2E test tier - #141

Open
samir-gandhi wants to merge 2 commits into
mainfrom
feat/provisioned-e2e-test-tier
Open

tests: Add provisioned-environment E2E test tier#141
samir-gandhi wants to merge 2 commits into
mainfrom
feat/provisioned-e2e-test-tier

Conversation

@samir-gandhi

Copy link
Copy Markdown
Contributor

Summary

  • Adds terraform-test-data/ — hand-authored Terraform fixtures, starting with one representative resource (sso/population). pingone_environment itself is a fixture resource in terraform-test-data/root, so environment creation goes through the same Terraform/provider path as everything else.
  • Adds tools/tf-regression-provision — thin CLI wrapper around terraform apply/destroy plus output parsing. Holds no PingOne API logic itself; environment lifecycle and fixture provisioning are entirely expressed as Terraform, authenticated with a single org-admin credential scoped to this run.
  • Adds make e2e (backed by tests/regression-provisioned/run-local.sh), which provisions a throwaway environment, applies the fixtures, runs the existing base-vs-PR export/compare pipeline (tools/regression-compare, tests/regression/matrix.json) against it, and tears the environment down unconditionally on exit.
  • Updates .gitignore for local/ephemeral Terraform artifacts (.terraform/, lock file, state, terraform.tfvars.json) and to stop the existing blanket *.tf ignore (meant for generated export output) from swallowing the new hand-authored terraform-test-data/**/*.tf fixtures.

This is additive to tests/regression/, which is unchanged and continues comparing export output between binary versions against its existing static environment.

Closes #140.

Test plan

  • go build ./tools/tf-regression-provision/... and go vet ./tools/tf-regression-provision/...
  • terraform validate and terraform fmt -check -recursive on terraform-test-data/
  • bash -n tests/regression-provisioned/run-local.sh
  • go mod tidy — no go.mod/go.sum changes (no new dependencies)
  • Ran make e2e live end-to-end against a real (non-prod) PingOne org: provisioned an environment, applied the sso/population fixture, ran all 5 matrix entries from tests/regression/matrix.json (base vs. PR export, 0 breaking / 0 acceptable diffs on each), then tore the environment down. Confirmed via a follow-up API read that the environment no longer exists after teardown.
  • Verified the cleanup path also fires and fully removes the environment on a forced mid-run failure (a real bug found and fixed during development), not just on success.

Notes for reviewers

  • New credentials required to run this locally, org-admin scoped, used only for this run's environment create/destroy: PINGCLI_PINGONE_ORGADMIN_CLIENT_ID, PINGCLI_PINGONE_ORGADMIN_CLIENT_SECRET, PINGCLI_PINGONE_ORGADMIN_ENVIRONMENT_ID, PINGCLI_PINGONE_ORGADMIN_REGION_CODE, PINGCLI_PINGONE_ORGADMIN_LICENSE_ID. Not wired into CI in this PR — local-only via make e2e pending a decision on scheduling/cost with the org owner.
  • terraform-test-data/ currently covers only 1 of the ~23 currently-supported resource types; follow-up PRs will expand coverage in small, dependency-ordered batches (see the tracking issue).

Adds terraform-test-data/ (hand-authored Terraform fixtures per resource),
tools/tf-regression-provision (creates/destroys a throwaway PingOne
environment via Terraform itself, using org-admin credentials scoped to
this run's lifecycle), and a `make e2e` entry point that applies fixtures
into that environment and runs the existing base-vs-PR export/compare
pipeline against it. Additive to tests/regression/, which continues
comparing export output against a static environment unchanged.

Closes #140.
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Regression Test Results

Matrix Entry Status Breaking Acceptable

✅ No regressions detected

All export configurations produced compatible output.


Generated by regression workflow • View run

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Regression Test Results

Matrix Entry Status Breaking Acceptable
default-hcl ✅ PASS 0 0
default-tfjson ✅ PASS 0 0
hcl-include-all ✅ PASS 0 0
hcl-skip-deps ✅ PASS 0 0
tfjson-skip-deps ✅ PASS 0 0

✅ No regressions detected

All export configurations produced compatible output.


Generated by regression workflow • View run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add provisioned-environment E2E test tier (terraform-test-data + make e2e)

1 participant