Cover organization_prometheus_get + private_endpoint_config_get_list#179
Open
sdairs wants to merge 3 commits into
Open
Cover organization_prometheus_get + private_endpoint_config_get_list#179sdairs wants to merge 3 commits into
sdairs wants to merge 3 commits into
Conversation
efa7803 to
4fbc39a
Compare
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.
90027db to
ad23877
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 a read-only Org Observability phase to
integration_org_test.rscovering 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-levelservice prometheusstep inintegration_test.rs.organization_private_endpoint_config_get_list— deprecated endpoint; usesctx.provider+ctx.regionas 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
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 unrelated and present onmain)cargo test -p clickhouse-cloud-api— all suites green;integration_org_testregisters one ignored lifecycle test as expected--ignoredrun via cloud-integration workflow on this PR