Skip to content

Cover openapi key get/list/update in org integration suite#183

Open
sdairs wants to merge 1 commit into
issue-152-bootstrap-org-integrationfrom
issue-156-openapi-key
Open

Cover openapi key get/list/update in org integration suite#183
sdairs wants to merge 1 commit into
issue-152-bootstrap-org-integrationfrom
issue-156-openapi-key

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented May 15, 2026

Summary

Adds an OpenAPI Key Lifecycle phase to integration_org_test.rs so 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.

  • New phase creates a key named clickhousectl-org-it-{run_id}, independent of the service-suite key in integration_test.rs, so a failure in either suite cannot poison the other.
  • openapi_key_get asserts id/name/state match what create returned.
  • openapi_key_get_list asserts the new key id appears in the list.
  • openapi_key_update rounds 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_delete runs at end of phase; the existing 404-tolerant api-key cleanup hook (already registered in support.rs) provides teardown insurance.
  • All steps are NonBlocking per the parent strategy.

No changes to CleanupRegistryregister_api_key / unregister_api_key already existed from PR #173.

Closes #156
Parent: #151

Stacked on #173

This PR targets issue-152-bootstrap-org-integration (PR #173) rather than main. GitHub will auto-retarget once #173 lands.

Test plan

  • cargo build -p clickhouse-cloud-api clean
  • cargo clippy -p clickhouse-cloud-api --test integration_org_test -- -D warnings clean (pre-existing clippy errors in integration_test.rs and spec_coverage_test.rs are 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_test still registers one ignored lifecycle test
  • Live --ignored run via the cloud-integration workflow once the parent PR lands

🤖 Generated with Claude Code

@sdairs sdairs requested a review from iskakaushik as a code owner May 15, 2026 16:11
@sdairs sdairs temporarily deployed to cloud-integration May 15, 2026 16:11 — with GitHub Actions Inactive
@sdairs sdairs linked an issue May 15, 2026 that may be closed by this pull request
@sdairs sdairs force-pushed the issue-152-bootstrap-org-integration branch 2 times, most recently from efa7803 to 4fbc39a Compare May 16, 2026 11:24
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>
@sdairs sdairs force-pushed the issue-156-openapi-key branch from 5d4efaf to 0de03cd Compare May 16, 2026 11:32
@sdairs sdairs temporarily deployed to cloud-integration May 16, 2026 11:32 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cover openapi key get/get_list/update in org integration suite

1 participant