Why
Every test for internal/gcp runs against a hand-written fake (fakeSecretManagerAPI) implementing a subset of *secretmanager.Client's method set. Nothing in this package has ever talked to real GCP Secret Manager. This is also the one provider with a documented correctness gap (no compare-and-swap on write) that's never been observed under real concurrent load.
What to verify against a real GCP project
Write path (SecretManager.WriteMany)
Rollback (SecretManager.Rollback)
Error classification
Auth
Scope
Needs a real (disposable) GCP project with Secret Manager API enabled and a service account with roles/secretmanager.admin or equivalent.
Why
Every test for
internal/gcpruns against a hand-written fake (fakeSecretManagerAPI) implementing a subset of*secretmanager.Client's method set. Nothing in this package has ever talked to real GCP Secret Manager. This is also the one provider with a documented correctness gap (no compare-and-swap on write) that's never been observed under real concurrent load.What to verify against a real GCP project
Write path (
SecretManager.WriteMany)Replication_Automaticcorrectly, and confirm that's actually the right default replication policy to ship (vs. requiring the caller to configure regions) — this was a design choice made without a real GCP account to sanity-check it against.AddSecretVersionwins outright, silently drops the earlier writer's sibling keys" behavior described in the code comment actually happens as described (rather than, say, GCP enforcing some ordering guarantee that would make the caveat moot).AlreadyExists-on-CreateSecretcreate-race fallback (re-read then merge) actually resolves correctly when two processes both try to create the same new secret simultaneously.Rollback (
SecretManager.Rollback)version N-1,AddSecretVersionit forward — confirm this actually behaves as documented against real secret version history, and that "latest" always resolves to the highest version number (the code assumes this; GCP's docs are the only source consulted so far).InvalidStatefailure when only one version exists.Error classification
remoteErrorassumes (codes.NotFound,codes.PermissionDenied,codes.Unauthenticated,codes.FailedPrecondition) — written from API documentation, not observed responses.Auth
secretmanager.NewClient(ctx)with no explicit options) against a real service account key file, workload identity, and thegcloud auth application-default loginflow.Scope
Needs a real (disposable) GCP project with Secret Manager API enabled and a service account with
roles/secretmanager.adminor equivalent.