Skip to content

Cover organization_prometheus_get + private_endpoint_config_get_list#179

Open
sdairs wants to merge 3 commits into
issue-152-bootstrap-org-integrationfrom
issue-157-prometheus-pe-config
Open

Cover organization_prometheus_get + private_endpoint_config_get_list#179
sdairs wants to merge 3 commits into
issue-152-bootstrap-org-integrationfrom
issue-157-prometheus-pe-config

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented May 15, 2026

Summary

Adds a read-only Org Observability phase to integration_org_test.rs covering two trivial org-scoped endpoints with no prior live coverage:

  • organization_prometheus_get — fetches metrics output and asserts it is non-empty, mirroring the service-level service prometheus step in integration_test.rs.
  • organization_private_endpoint_config_get_list — deprecated endpoint; uses ctx.provider + ctx.region as the required query params and asserts the call succeeds and deserializes. An empty config is acceptable since the test org may not have a private endpoint in this region.

Both steps are NonBlocking. No resources are created, so no cleanup logic is needed.

Closes #157
Parent: #151

Note: stacked on #173 (issue-152-bootstrap-org-integration). GitHub will auto-retarget to main once #173 merges.

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 unrelated and present on main)
  • cargo test -p clickhouse-cloud-api — all suites green; integration_org_test registers one ignored lifecycle test as expected
  • Live --ignored run via cloud-integration workflow on this PR

@sdairs sdairs requested a review from iskakaushik as a code owner May 15, 2026 16:07
@sdairs sdairs had a problem deploying to cloud-integration May 15, 2026 16:07 — with GitHub Actions Failure
@sdairs sdairs had a problem deploying to cloud-integration May 15, 2026 17:37 — with GitHub Actions Failure
@sdairs sdairs temporarily deployed to cloud-integration May 15, 2026 18:16 — 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
sdairs added 3 commits May 16, 2026 12:32
Adds a read-only Org Observability phase to integration_org_test.rs
exercising two trivial org-scoped endpoints that previously had no live
coverage:

- organization_prometheus_get — asserts metrics output is non-empty
  (mirrors the service-level check in integration_test.rs).
- organization_private_endpoint_config_get_list — deprecated endpoint;
  asserts the call succeeds and deserializes. An empty config is
  acceptable since the test org may not have a private endpoint in this
  region.

Both steps are NonBlocking; no resources created, no cleanup needed.

Closes #157
Parent: #151
Stacked on #173.
The org-level prometheus exporter returns empty text when no service in
the org is currently emitting metrics. The org integration suite
deliberately does not provision a service (per the suite's contract),
so empty output is the expected shape and should not fail the run.

Coverage value here is exercising the client method (auth, routing,
text-body extraction). The service-level `instance_prometheus_get`
endpoint retains its non-empty assertion in integration_test.rs where
a service has just been provisioned.
The org suite is intentionally service-less, but the deprecated
`organization_private_endpoint_config_get_list` endpoint requires at
least one instance in the requested provider+region — it returns
`400 BAD_REQUEST: organization has no created instances in <provider>
<region>` otherwise.

Match that specific 400 and treat it as the expected response: it
proves auth, routing and the 400 deserialization path. The populated
path (with an instance present) is covered by the service-level
integration test in integration_test.rs.
@sdairs sdairs force-pushed the issue-157-prometheus-pe-config branch from 90027db to ad23877 Compare May 16, 2026 11:33
@sdairs sdairs temporarily deployed to cloud-integration May 16, 2026 11:33 — 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 organization_prometheus_get + private_endpoint_config_get_list

1 participant