Repository navigation
Conversation
Pure rename so blame follows the file. An explicit [[test]] target keeps the models_test name; cargo does not also infer a second `models` target for the same path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/models/main.rs keeps the module declarations and the shared assert_unknown_variant_round_trips helper; each test moves unchanged to the module named after the src/models/ file whose types it exercises. invitations, members, rbac and quotas fold into organizations, clickstack_enums into clickstack, and tests that span several domains go to cross_domain. Four section-divider comments whose tests now land in several modules are dropped. Still one test binary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each tests/models/*.rs module maps to no live Cloud suite, like tests/models_test.rs did: the models_test binary is offline serde 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 (3 of 6:
tests/models_test.rs). Stacked on #1177.Summary
This splits
crates/clickhouse-cloud-api/tests/models_test.rs(11.2k lines, 455#[test]items) into atests/models/directory. It is still one test binary, and the target is still namedmodels_test. No test changes.main.rsmoddeclarations and the sharedassert_unknown_variant_round_tripshelperactivity.rsActivity*api_keys.rsbackups.rsbyoc.rsclickpipes.rsclickstack.rsclickstack_enumscross_domain.rsorganizations.rspostgres.rsquery_api_endpoints.rssaved_queries.rsscim.rsservices.rsshared.rsApiResponseenvelope and pagination, shared request/response leaves, resource tagsudfs.rswhoami.rsEach test moved unchanged to the module named after the
src/models/file whose types it exercises. The smallinvitations,members,rbacandquotasdomains fold intoorganizations, andclickstack_enumsfolds intoclickstack.Commits
git mvoftests/models_test.rstotests/models/main.rs(100% similarity), plus a[[test]] name = "models_test"target inCargo.toml. Cargo does not also infer a secondmodelstarget for the same path.mod/uselines and four dropped section-divider comments whose tests now sit in several modules. Review it withgit show --color-moved=dimmed-zebra.tests/models/*.rsfile maps to no live Cloud suite, asmodels_test.rsdid. The old path stays mapped so diffs that name it remain classified, and the classifier test fixture lists the new files. The install classifier only inventoriescrates/clickhousectl, so it needed no change..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/models/layout. The README's--test models_testcommand is unchanged.Visibility widenings
None. The shared helper stays a private function in
main.rs, which its child modules can already see.Tests
clickhouse-cloud-apiandclickhouse-openapi-analyzer, 451 of them inmodels_testin each feature configuration. Test names match once module paths are stripped.python3 scripts/check-openapi-drift.py --dry-rungives identical output before and after.--all-targets), bothclickhousectlclippy configurations, the--no-default-featurescheck,cargo check --workspace --all-features,cargo test -p clickhouse-cloud-api -p clickhouse-openapi-analyzer(withspec_coverage_testandmodel_facade_testunchanged) 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 layout and documentation; no library or runtime behavior changes.
Overview
Reorganizes the offline Cloud API model serde tests from a single ~11k-line
models_test.rsintotests/models/, still compiled as one integration test binary namedmodels_test.Cargo.tomldeclares an explicit[[test]]target pointing attests/models/main.rsso Cargo keeps themodels_testname and does not auto-discover a duplicate.main.rswires one module persrc/models/domain (small domains folded into parents, e.g. invitations/RBAC intoorganizations) pluscross_domain.rsfor cross-cutting checks; sharedassert_unknown_variant_round_tripsstays inmain.rs.Test bodies are moved unchanged into domain files such as
activity.rs,clickpipes.rs,postgres.rs, etc.—behavior and counts should match the monolith.AGENTS.mddocuments where to add new model tests..git-blame-ignore-revsadds the bulk-move commit for cleaner blame history.Reviewed by Cursor Bugbot for commit 39c906e. Bugbot is set up for automated code reviews on this repo. Configure here.