refactor: split offline test suites into feature-organized submodules#95
refactor: split offline test suites into feature-organized submodules#95lightstrike wants to merge 1 commit intoflipbit03:mainfrom
Conversation
Split the two monolithic offline test files into feature-organized submodules for easier navigation and maintenance. CLI offline (64 tests): 13 submodules (usage, issues, teams, projects, documents, cycles, milestones, embeds, comments, auth, self_update, format, labels). SDK offline (39 tests): 2 submodules (queries, mutations). Uses #[path] attributes since Rust integration tests don't follow standard edition 2021 module resolution for subdirectories.
|
@flipbit03 Let me know if you feel architecturally aligned on the intent of this PR. Noticed the test files were getting quite long. If this approach feels right, I'll dial in and get review ready. If not, please advise how you'd like to approach. |
|
@lightstrike I'm in agreement to this strategy and I really think it is for the best - Since we have quite a bit in the pipeline already, let's first vet/approve/merge your other PRs and then I think this one is ready to be:
Also, we should probably modify the |
|
@lightstrike PS: Also, it would be great if you allowed me to do quick edits on your contribution branches - This way, I'd be able to deliver some of these requested tweaks myself - specially if it's minor stuff, I can just jump straight in, and it might make for a more efficient async contribution experience. Thanks! |
Summary
crates/lineark/tests/offline.rs, 64 tests) → 13 submodules: usage, issues, teams, projects, documents, cycles, milestones, embeds, comments, auth, self_update, format, labelscrates/lineark-sdk/tests/offline.rs, 39 tests) → 2 submodules: queries, mutations#[path]attributes since Rust integration tests don't follow standard edition 2021 module resolution for subdirectories (e.g.mod foo;intests/bar.rslooks fortests/foo.rs, nottests/bar/foo.rs)Scope
Only the two default-harness (offline) test files are split. The three custom-harness files (
online.rs,blocking_online.rs) that usetest_with::runner!/test_with::tokio_runner!+#[test_with::module]are left as-is — theinclude!pattern doesn't work with#[test_with::module]because the proc macro processes tokens beforeinclude!is expanded.Test plan
cargo test -p lineark --test offline— 64 passedcargo test -p lineark-sdk --test offline— 39 passed--listbefore and after)make checkpasses (fmt, clippy, doc, build)make testpasses (all workspace tests)schema/operations.tomlor generated code