Cover activity log endpoints in org integration suite#180
Open
sdairs wants to merge 1 commit into
Open
Conversation
efa7803 to
4fbc39a
Compare
Adds an Activity Log phase to integration_org_test.rs that exercises activity_get_list and activity_get against the production org. The phase polls the activity list for up to 30s (3s interval) for an entry whose createdAt falls within the current test window, then calls activity_get on that entry and asserts id, organizationId, and createdAt are populated. Both steps are NonBlocking and record to FailureRecorder on miss; activity log writes are eventually consistent so a short quiet window on the org should not fail the run. Placed after the Org Access phase so once the Custom Roles phase (#154) lands directly above it, the role create + delete events become the known-recent activity the polling check correlates against. Until then the phase degrades to "any entry within the test window" — documented inline. Closes #155
0c44fd5 to
cb42128
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 Activity Log phase to
integration_org_test.rscovering the two previously-uncovered org-scoped methods.activity_get_list— polled for up to ~30s (3s interval) for an entry whosecreatedAtfalls within the current test window; falls back gracefully on a quiet org by recording a NonBlocking failure rather than panicking.activity_get— fetched for the entry found above; assertsidround-trips,organizationIdis non-empty,createdAtis non-zero.NonBlocking— eventual-consistency misses do not fail the run, they surface in theFailureRecordersummary.Phase ordering
Placed after the Org Access phase. Once the Custom Roles phase (#154) lands directly above this one, the role create + delete events become the known-recent activity the polling check correlates against; until then the phase degrades to "any entry within the test window". Documented inline so a future reviewer adding #154 knows where to slot it.
Polling strategy
poll_untilfromsupport.rswith a 30s budget and 3s interval. On timeout the inner error is wrapped into a clean NonBlocking failure message ("no activity entry observed within 30s budget: ...") for readableFailureRecorderoutput.Stacked PR note
This PR is stacked on #173 (#152 bootstrap) and is best-reviewed after the Custom Roles phase (#154) lands. GitHub will auto-retarget
--basetomainwhen #173 merges.Closes #155
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 inspec_coverage_test.rsandintegration_test.rsare present on the base branch and unrelated)cargo test -p clickhouse-cloud-api— all suites green;integration_org_test::cloud_org_lifecycleregisters as one ignored lifecycle test as expected--ignoredrun via cloud-integration workflow (requires the existingCLICKHOUSE_CLOUD_*secrets already wired up by Add integration_org_test.rs skeleton for org-only live coverage #152)🤖 Generated with Claude Code