Cover openapi key get/list/update in org integration suite#183
Open
sdairs wants to merge 1 commit into
Open
Conversation
efa7803 to
4fbc39a
Compare
Adds a dedicated OpenAPI Key Lifecycle phase to `integration_org_test.rs` covering `openapi_key_create`, `openapi_key_get`, `openapi_key_get_list`, `openapi_key_update`, and `openapi_key_delete` against the live API. The key is named with `ctx.run_id` and is kept independent from the service-suite key in `integration_test.rs`. Update is a state round-trip (enabled -> disabled -> enabled) verified via a fresh GET in between, exercising the PATCH read-back contract. The created key is registered with `CleanupRegistry` immediately after creation; the existing api-key cleanup hook (404-tolerant) handles teardown when the explicit `openapi_key_delete` step fails or is skipped. All steps are NonBlocking. Closes #156 Parent: #151 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5d4efaf to
0de03cd
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.
Summary
Adds an OpenAPI Key Lifecycle phase to
integration_org_test.rsso the read + update paths (openapi_key_get,openapi_key_get_list,openapi_key_update) get live coverage alongside the existing create + delete pair that the service suite already exercises.clickhousectl-org-it-{run_id}, independent of the service-suite key inintegration_test.rs, so a failure in either suite cannot poison the other.openapi_key_getasserts id/name/state match what create returned.openapi_key_get_listasserts the new key id appears in the list.openapi_key_updaterounds the state through enabled -> disabled -> enabled, verifying the disabled state via a fresh GET in between (so we exercise the PATCH read-back contract, not just the response).openapi_key_deleteruns at end of phase; the existing 404-tolerant api-key cleanup hook (already registered insupport.rs) provides teardown insurance.NonBlockingper the parent strategy.No changes to
CleanupRegistry—register_api_key/unregister_api_keyalready existed from PR #173.Closes #156
Parent: #151
Stacked on #173
This PR targets
issue-152-bootstrap-org-integration(PR #173) rather thanmain. GitHub will auto-retarget once #173 lands.Test plan
cargo build -p clickhouse-cloud-apicleancargo clippy -p clickhouse-cloud-api --test integration_org_test -- -D warningsclean (pre-existing clippy errors inintegration_test.rsandspec_coverage_test.rsare unchanged from Add integration_org_test.rs skeleton for org-only live coverage #173 /main)cargo test -p clickhouse-cloud-api— all suites green;integration_org_teststill registers one ignored lifecycle test--ignoredrun via the cloud-integration workflow once the parent PR lands🤖 Generated with Claude Code