Add local server state machine subprocess tests - #521
Conversation
8eabc0c to
f168202
Compare
8f574d6 to
1e87a7e
Compare
|
Addressed the The state-machine fixture now installs and selects a fake Verified with:
|
4f89979 to
e9fb2cf
Compare
c764b48 to
b8f1bf9
Compare
e9fb2cf to
b037cd5
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b037cd5. Configure here.
| .join("clickhouse"); | ||
| std::fs::create_dir_all(binary.parent().expect("fake binary parent")) | ||
| .expect("create fake version directory"); | ||
| std::fs::write(&binary, b"#!/bin/sh\nexec sleep 300\n").expect("write fake ClickHouse"); |
There was a problem hiding this comment.
Fake binary breaks process detection
High Severity
install_fake_clickhouse uses exec sleep 300, which replaces the process image so cmdline/basename are no longer clickhouse. Managed inspection then treats the server as not running, so list/stop/remove/collision checks in this suite cannot observe real running state. Sibling fixtures keep a trap/loop shell so identity checks still pass.
Reviewed by Cursor Bugbot for commit b037cd5. Configure here.
|
Superseded by #562 in stack #563. |


Summary
Closes #479
Tests
cargo test -p clickhousectl --test local_server_state_machine_test(4 consecutive corrected runs; 25.29s-25.53s)cargo test -p clickhousectl(639 unit tests plus all integration suites)cargo fmt --all --checkcargo clippy -p clickhousectl --all-targets -- -D warningsStack
issue-478-local-lifecycle-help)