Repository navigation
Conversation
Pure rename so blame follows the file. An explicit [[test]] target keeps the client_test name; cargo does not also infer a second `client` target for the same path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/client/main.rs keeps the module declarations and the shared wiremock helpers (ok_json, ok_empty, created_json, setup); each test moves unchanged to the module named after the src/client/ file that defines the Client method it calls. client.rs takes the construction, authentication, base URL and error-handling tests, plus the one test that spans several domains. Every section divider survives once; where a section's tests now land in several modules, its divider stays with the module that receives the section's first test. Still one test binary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each tests/client/*.rs module maps to no live Cloud suite, like tests/client_test.rs did: the client_test binary is offline wiremock coverage and none of the live integration targets include it. The old path stays mapped so diffs that name it remain classified. The install classifier inventories only crates/clickhousectl, so it needs no entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Part of #1173 (4 of 6:
tests/client_test.rs). Stacked on #1178.Summary
This splits
tests/client_test.rs(7.2k lines, 231 wiremock tests) intotests/client/, which is still oneclient_testbinary. Behaviour and test names are unchanged. Each test moves to the module named after thesrc/client/file that defines theClientmethod it calls.main.rsmoddeclarations and the shared wiremock helpers (ok_json,ok_empty,created_json,setup)client.rsactivity.rsapi_keys.rsbackups.rsbyoc.rsclickpipes.rsclickstack.rsinvitations.rsmembers.rsorganizations.rspostgres.rsquery_api_endpoints.rssaved_queries.rsservices.rsudfs.rswhoami.rsThere is no
rbac.rs, because no client test calls anorganization_role*method. The ClickStack role tests go inclickstack.rs.tests/run_query_test.rsis unchanged.Every section divider survives once. A section whose tests now land in several modules keeps its divider in the module that gets its first test.
Commits
git mvoftests/client_test.rs→tests/client/main.rs(100%), plus a[[test]] name = "client_test"target so the binary keeps its name. Cargo does not infer a secondclienttarget.use/modlines, dividers and blank lines. Review it withgit show --color-moved=dimmed-zebra.tests/client/*.rspath maps to no live Cloud suite, liketests/client_test.rs, which stays mapped so diffs that name it remain classified. The fixture inscripts/tests/is updated. The install classifier only inventoriescrates/clickhousectl..git-blame-ignore-revsentry for commit 2. This SHA must be updated if the stack is rebased before merge.crates/clickhouse-cloud-api/AGENTS.mddescribes thetests/client/layout. The README needs no change because it names only the unchanged--test client_testtarget.Visibility widenings
None. The helpers stay private in
main.rs, and the modules reach them withuse crate::{...}.Tests
clickhouse-cloud-apiandclickhouse-openapi-analyzer.client_testlists the same 231 names. Names match once module paths are stripped.check-openapi-drift.py --dry-runoutput is identical before and after.cargo clippy -p clickhousectl, the--no-default-featurescheck,cargo check --workspace --all-features, the API and analyzer tests (spec_coverage_testandmodel_facade_testuntouched) and the Python classifier tests all pass.Merge with a merge commit, not a squash. The
.git-blame-ignore-revsentry names this PR's move commit. A squash merge would leave it pointing at a commit that isn't on main, and git would silently ignore it.🤖 Generated with Claude Code
Note
Low Risk
Test-only file moves and Cargo/docs metadata; no changes to the public API client implementation.
Overview
Reorganizes the offline wiremock
client_testsuite from one ~7k-linetests/client_test.rsintotests/client/, still a single binary namedclient_test.Cargo.tomladds an explicit[[test]]entry pointing attests/client/main.rsso the target name stays stable when Cargo no longer auto-discovers a lone file.main.rsdeclares one module persrc/client/domain (plusclient.rsfor auth, construction, and shared error handling) and keeps the shared helpers (setup,ok_json,ok_empty,created_json). Existing tests are moved into matching files without behavior or name changes;AGENTS.mddocuments where to add new client tests..git-blame-ignore-revsrecords the bulk move commit for blame hygiene.Reviewed by Cursor Bugbot for commit f8cc2a5. Bugbot is set up for automated code reviews on this repo. Configure here.