Skip to content

Cover members + invitations in org integration suite #153

@sdairs

Description

@sdairs

Summary

member_get_list, member_get, member_update, plus the full invitation CRUD (invitation_create, invitation_get_list, invitation_get, invitation_delete) are not covered live. Add them as phases in the org suite.

Scope

Members

  • Assert member_get_list returns both the primary and secondary user.
  • member_get for the secondary user — assert fields populated.
  • member_update to flip the secondary user's role (e.g. DEVELOPER → ADMIN), then flip back. Both must succeed; the post-test state must equal pre-test state.

Invitations

  • invitation_create with alasdair.brown+clickhousectl_{run_id}@clickhouse.com as the recipient. Register the returned invitation id with the cleanup registry.
  • invitation_get_list — assert the new invitation appears.
  • invitation_get for the new invitation — assert fields match what was sent.
  • invitation_delete (cancel before accept).

Out of scope

  • member_delete — would kick the test fixture.
  • Invitation accept — UI-only.

Where this lands

  • crates/clickhouse-cloud-api/tests/integration_org_test.rs (new phases)
  • crates/clickhouse-cloud-api/tests/integration/support.rs (read CLICKHOUSE_CLOUD_TEST_SECONDARY_USER_ID)

Notes

  • The secondary user's pre-test role must be captured at the start of the test and restored at the end, even on failure — register a cleanup step rather than relying on the test body to flip back.
  • Catch-all alias filters in Gmail handle the invitation noise; cancellation prevents accidental org joins.

Parent: #151

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttest-coverageLive API integration test coverage work

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions