Fix test compilation, document user_delegate, cover concurrent-update retry - #26
Open
kisst wants to merge 7 commits into
Open
Fix test compilation, document user_delegate, cover concurrent-update retry#26kisst wants to merge 7 commits into
kisst wants to merge 7 commits into
Conversation
go vet (run by go test on Go 1.24) rejected fmt.Errorf/t.Fatalf calls passing a dynamic string as the format. The test package failed to compile; this blocked running any tests in it.
The resource shipped in v0.8 but docs were last regenerated before it was added, leaving it the only undocumented resource. Adds the missing example and regenerates the page via tfplugindocs.
The 412 and 400 'Invalid Input: resource_id' retry paths added for eventual-consistency handling had no coverage. Tests assert both retryable cases plus negative cases so the predicate can't silently widen.
kisst
force-pushed
the
docs-and-test-coverage
branch
2 times, most recently
from
June 9, 2026 10:07
63f5221 to
fbd9d22
Compare
The README was the upstream template verbatim: it claimed HashiCorp maintainership, carried HashiCorp's experimental-status legal disclaimer, and release/issue/registry/contribution links pointing at the archived upstream. Repoints them at this fork, states the actual maintainer, notes the upstream archival, corrects the Go floor (>= 1.24), and points the Unit tests badge at the new workflow. HashiCorp's MPL copyright and Special Recognition are kept.
Commit 86270a6 lowered numConsistent from 4 to 2 but did not update this test, which still asserted against currConsistent=4 and failed deterministically. Reference numConsistent directly so the test tracks the constant.
The README advertised a Unit tests badge but no such workflow existed, and the test package was never run in CI. Runs build, vet, and 'make test' on pushes to main and on PRs. Pins actions to current SHAs (checkout v6.0.3, setup-go v6.4.0).
release.yml pinned actions/checkout v3.5.3 and actions/setup-go v4.1.0; bump to current v6.0.3 / v6.4.0 to match the new test workflow.
kisst
force-pushed
the
docs-and-test-coverage
branch
from
June 9, 2026 10:12
fbd9d22 to
07307a6
Compare
kisst
marked this pull request as ready for review
June 9, 2026 10:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves documentation accuracy, test coverage, and adds CI. Seven atomic commits; each builds and passes
go vet+make teston its own.1. Fix non-constant format string vet errors in tests
The test package did not compile under Go 1.24's
go vet: 29non-constant format stringerrors across 11 files (e.g.fmt.Errorf(diags[0].Summary),t.Fatalf(err.Error())). Fixed with"%s"format strings.2. Add docs and example for
googleworkspace_user_delegateuser_delegatewas the only resource missing fromdocs/. Added the example and regenerated viatfplugindocs; onlyuser_delegate.mdchanges.3. Add unit tests for
isConcurrentUpdateErrorretry predicateThe 412 / 400
Invalid Input: resource_idretry paths had no coverage. Adds both retryable cases, two negative cases, and a non-Google-error case.4. Correct README to reflect the community fork
The README was the upstream template verbatim (claimed HashiCorp maintainership, HashiCorp legal disclaimer, links to the archived upstream). Repoints maintainer/badges/links at this fork, notes the upstream archival, corrects the Go floor (>= 1.24), and points the Unit tests badge at the new workflow (commit 6). MPL copyright and Special Recognition kept.
5. Fix stale
TestConsistencyCheckReachedConsistencyexpectationsCommit 86270a6 lowered
numConsistentfrom 4 to 2 but didn't update this test, which asserted againstcurrConsistent=4and failed deterministically. Now referencesnumConsistentdirectly so it tracks the constant.6. Add Unit tests GitHub Actions workflow
The README advertised a Unit tests badge but no workflow existed and the test package was never run in CI. Runs build, vet, and
make teston pushes tomainand on PRs. Actions pinned to current commit SHAs (checkout v6.0.3, setup-go v6.4.0). Validated withactionlint.7. Bump checkout and setup-go action pins in release workflow
release.ymlpinnedactions/checkoutv3.5.3 andactions/setup-gov4.1.0; bumped to current v6.0.3 / v6.4.0 (immutable SHA pins) to match the new test workflow.Testing
go build ./...,go vet ./...,make test— all clean at HEADTestAcc*) require a live Workspace tenant and were not run.Opened as a draft for maintainer review.