Repository navigation
test(gcp): pin offering IDs, hourly rates and the Cloud Storage catalog cache - #647
Conversation
…og cache Assert the per-service OfferingID prefix, EffectiveHourlyRate and TotalCost in each GetOfferingDetails, and that getStoragePricing lists the SKU catalog once per client. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Matches the Cloud SQL, Memorystore and Cloud Storage clients after #646. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 6 billable files and costs up to $1.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 1 minute for your next included review. View limit details
Comment |
|
Cold review (claude-autospotting) at a78a1fe: APPROVE Mutation probes. Each was applied alone and reverted, and every one fails a test:
No tautologies. Expected values are literal inputs and constants.
a78a1fe. Scope. c09c488 changes only Races. Each new test builds its own client and mock, there are no package-level variables, and the touched packages pass under Build at a78a1fe (detached scratch worktree, under the heavy lock, -count=1):
|
|
Cold review (claude-cc-libs reviewer agent) at a78a1fe: APPROVE Findings: no actionable findings. What I attacked and how (scratch worktree detached at a78a1fe, base main eb546af):
Nit, non-blocking: the Memorystore pins are in a new offering_pins_test.go instead of the existing GetOfferingDetails test. That is fine as is. |
Summary
Follow-up to #646, covering the non-blocking review findings there:
GetOfferingDetailstest now assertsOfferingIDwith its prefix (gcp-cloudsql-,gcp-memorystore-,gcp-storage-,gcp-compute-), plusEffectiveHourlyRateandTotalCost. Before this, swapping the commitment total and hourly rate at a call site went undetected outside Cloud Storage, and so did changing the Cloud SQL or Compute Engine prefix.TestGetStoragePricing_CachesSKUsPerClientruns the Cloud Storage catalog cache throughgetStoragePricingand asserts one catalog read across three lookups (CodeRabbit nitpick on refactor(gcp): share term price scaling and cache the Cloud Storage catalog #646).ValidateOfferingusesslices.Contains, like the other three clients. The error text is unchanged.Tests
providers/gcp:go test ./...passes with and without the workspace (GOWORK=off), andgolangci-lintreports 0 issues.Refs #95
🤖 Generated with Claude Code