Cover instance_password_update + instance_scaling_update#174
Open
sdairs wants to merge 2 commits into
Open
Conversation
Closes #159. Adds two phases to the live service-CRUD integration test: - **Vertical scaling (deprecated endpoint)** — exercises `instance_scaling_update` (PATCH /scaling), distinct from `instance_replica_scaling_update` (PATCH /replicaScaling). Captures the service's pre-state `minTotalMemoryGb`/`maxTotalMemoryGb` at the end of the existing scaling phase (1 replica @ 8 GB so totals map cleanly to per-replica), round-trips 8 → 16 → 8 GB via the deprecated body, polling for each change to land. Post-condition equals pre-condition so downstream phases see the expected base state. Non-blocking — the endpoint is deprecated and not depended on. - **Password rotation** — new "Password" phase exercises `instance_password_update` with an empty body so the server generates the password. Asserts the response surfaces a non-empty password. The query path used elsewhere in the suite is openapi-key based, so the rotated password is not consumed; no re-rotation needed because the service is deleted immediately after. Non-blocking. Also rewrites four pre-existing nested `if let` blocks in `spec_coverage_test.rs` as let-chains so `cargo clippy --tests -- -D warnings` passes — CI's clippy invocation omits `--tests`, so these had drifted past the lint floor. Semantics unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The deprecated `instance_scaling_update` endpoint validates `minTotalMemoryGb`/`maxTotalMemoryGb` as multiples of 12 (the modern `instance_replica_scaling_update` endpoint accepts multiples of 4). The test was using 16 GB and hit `BAD_REQUEST: The value must be a multiple of 12 <number:16>`. Add a "land on multiple-of-12 memory" Blocking step that moves the service from the modern phase's 8 GB to 12 GB via the modern endpoint before entering the deprecated round-trip, then round-trip 12 → 24 → 12 via the deprecated endpoint. Capture pre-state remains in place so the restore step adapts if the API ever returns a different starting value.
caec374 to
c2051ad
Compare
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.
Closes #159.
Summary
Adds two phases to the live service-CRUD integration test:
instance_scaling_update(PATCH/scaling), distinct frominstance_replica_scaling_update(PATCH/replicaScaling) already covered. CapturesminTotalMemoryGb/maxTotalMemoryGbfrom the service at the tail of the existing scaling phase (1 replica @ 8 GB, so totals map cleanly to per-replica), round-trips8 → 16 → 8 GB, polling for each change. Post-condition equals pre-condition so downstream phases see the expected base state. Non-blocking — the endpoint is deprecated and nothing downstream depends on it.instance_password_updatewith an empty body (server generates the password). Asserts the response surfaces a non-empty password. The query path used elsewhere in the suite is openapi-key based, so the rotated password is not consumed downstream; no re-rotation needed since the service is deleted immediately after. Non-blocking.Also rewrites four pre-existing nested
if letblocks inspec_coverage_test.rsas let-chains socargo clippy --tests -- -D warningspasses — CI's clippy invocation omits--tests, so these had drifted past the lint floor. Semantics unchanged.Test plan
cargo build -p clickhouse-cloud-apicargo clippy -p clickhouse-cloud-api --tests -- -D warningscargo test -p clickhouse-cloud-api(mock + spec-coverage tests pass; live integration test remains#[ignore]and is unchanged structurally)Do NOT merge — verify the live run first.