Skip to content

Commit 76a10f6

Browse files
committed
test: add acceptance harness, pcd_identity_auth_scope acc test, and CI
Formal Gate B: TestAccIdentityAuthScopeDataSource_basic passes against the CE lab (terraform v1.15.8 + terraform-plugin-testing v1.16.0). - internal/acctest: protocol-6 provider factory + PreCheck (skips cleanly with no lab). - Acceptance test for pcd_identity_auth_scope, configured from OS_* env. - .github/workflows/test.yml: build, vet, gofmt, unit tests, terraform fmt on examples. - Record golangci-lint / docs-drift CI as deferred to the docs phase (DECISIONS.md).
1 parent 76b7987 commit 76a10f6

7 files changed

Lines changed: 330 additions & 16 deletions

File tree

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build-test:
13+
name: build / vet / fmt / unit
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-go@v5
18+
with:
19+
go-version-file: go.mod
20+
cache: true
21+
- name: build
22+
run: go build ./...
23+
- name: vet
24+
run: go vet ./...
25+
- name: gofmt
26+
run: |
27+
out="$(gofmt -l .)"
28+
if [ -n "$out" ]; then echo "gofmt needed on:"; echo "$out"; exit 1; fi
29+
- name: unit tests
30+
# Acceptance (TF_ACC) and live (PCD_LIVE_TEST) tests self-skip here.
31+
run: go test ./internal/... -timeout 120s
32+
33+
terraform-fmt:
34+
name: terraform fmt (examples)
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: hashicorp/setup-terraform@v3
39+
with:
40+
terraform_wrapper: false
41+
- run: terraform fmt -check -recursive ./examples

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ All notable changes to this project are documented here. The format is based on
1919
domain, and roles.
2020
- Committed CE 2026.4 compatibility evidence from Step 0 preflight
2121
(`docs/compatibility/ce-2026.4.md`).
22+
- Acceptance test harness (`internal/acctest`: protocol-6 provider factory + `PreCheck`)
23+
and the first acceptance test for `pcd_identity_auth_scope` (passes against the CE lab).
24+
- `test.yml` CI: build, vet, gofmt, unit tests, and `terraform fmt` on examples.
2225

2326
### Known gaps
2427
- `cloud` (clouds.yaml) is declared but not yet implemented; it errors if set.

DECISIONS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ tests arrive. Low risk; no locked decision affected.
5555
API is compatible.
5656
- **terraform-plugin-framework**: **v1.19.0** as planned.
5757

58+
## 2026-07-10 — Gate B passed; CI scope for now
59+
60+
`TestAccIdentityAuthScopeDataSource_basic` passes against the live lab (terraform
61+
v1.15.8 + terraform-plugin-testing v1.16.0). `test.yml` CI currently runs
62+
build/vet/gofmt/unit + `terraform fmt` on examples — all verified green locally.
63+
**golangci-lint and the `make generate` docs-drift gate are deferred** to the docs phase
64+
(they need `tools/` + a golangci-lint v2 config); tracked so CI stays green until then.
65+
66+
Terraform was installed from the official `releases.hashicorp.com` prebuilt binary
67+
(v1.15.8, darwin_arm64) because `brew install hashicorp/tap/terraform` failed on outdated
68+
Xcode Command Line Tools on the build host.
69+
5870
## 2026-07-10 — `cloud` (clouds.yaml) deferred
5971

6072
Declared in the provider schema for config-parity with `terraform-provider-openstack`,

go.mod

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,59 @@ go 1.25.8
55
require (
66
github.com/gophercloud/gophercloud/v2 v2.13.0
77
github.com/hashicorp/terraform-plugin-framework v1.19.0
8+
github.com/hashicorp/terraform-plugin-go v0.31.0
9+
github.com/hashicorp/terraform-plugin-testing v1.16.0
810
)
911

1012
require (
13+
github.com/ProtonMail/go-crypto v1.4.1 // indirect
14+
github.com/agext/levenshtein v1.2.3 // indirect
15+
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
16+
github.com/cloudflare/circl v1.6.3 // indirect
1117
github.com/fatih/color v1.18.0 // indirect
1218
github.com/golang/protobuf v1.5.4 // indirect
19+
github.com/google/go-cmp v0.7.0 // indirect
20+
github.com/hashicorp/errwrap v1.1.0 // indirect
21+
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
22+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
23+
github.com/hashicorp/go-cty v1.5.0 // indirect
1324
github.com/hashicorp/go-hclog v1.6.3 // indirect
25+
github.com/hashicorp/go-multierror v1.1.1 // indirect
1426
github.com/hashicorp/go-plugin v1.7.0 // indirect
27+
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
1528
github.com/hashicorp/go-uuid v1.0.3 // indirect
16-
github.com/hashicorp/terraform-plugin-go v0.31.0 // indirect
29+
github.com/hashicorp/go-version v1.9.0 // indirect
30+
github.com/hashicorp/hc-install v0.9.4 // indirect
31+
github.com/hashicorp/hcl/v2 v2.24.0 // indirect
32+
github.com/hashicorp/logutils v1.0.0 // indirect
33+
github.com/hashicorp/terraform-exec v0.25.1 // indirect
34+
github.com/hashicorp/terraform-json v0.27.2 // indirect
1735
github.com/hashicorp/terraform-plugin-log v0.10.0 // indirect
36+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.40.0 // indirect
1837
github.com/hashicorp/terraform-registry-address v0.4.0 // indirect
19-
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
38+
github.com/hashicorp/terraform-svchost v0.2.1 // indirect
2039
github.com/hashicorp/yamux v0.1.2 // indirect
2140
github.com/mattn/go-colorable v0.1.14 // indirect
2241
github.com/mattn/go-isatty v0.0.20 // indirect
42+
github.com/mitchellh/copystructure v1.2.0 // indirect
2343
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
24-
github.com/oklog/run v1.1.0 // indirect
44+
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
45+
github.com/mitchellh/mapstructure v1.5.0 // indirect
46+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
47+
github.com/oklog/run v1.2.0 // indirect
48+
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
2549
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
2650
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
27-
golang.org/x/net v0.48.0 // indirect
51+
github.com/zclconf/go-cty v1.18.1 // indirect
52+
golang.org/x/crypto v0.52.0 // indirect
53+
golang.org/x/mod v0.35.0 // indirect
54+
golang.org/x/net v0.54.0 // indirect
55+
golang.org/x/sync v0.20.0 // indirect
2856
golang.org/x/sys v0.45.0 // indirect
29-
golang.org/x/text v0.32.0 // indirect
57+
golang.org/x/text v0.37.0 // indirect
58+
golang.org/x/tools v0.44.0 // indirect
59+
google.golang.org/appengine v1.6.8 // indirect
3060
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
31-
google.golang.org/grpc v1.79.2 // indirect
61+
google.golang.org/grpc v1.79.3 // indirect
3262
google.golang.org/protobuf v1.36.11 // indirect
3363
)

0 commit comments

Comments
 (0)