test: add option behavior e2e coverage and smoke checks#40
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds behavior-level integration tests that verify key CLI options change runtime behavior as intended, and extends the GitHub Actions smoke suite to exercise a couple of these option semantics against RustFS “latest”.
Changes:
- Added
option_behavior_operationsintegration test module covering--dry-run,head --bytes,find --count, andshare --upload --expire. - Implemented 6 new end-to-end option behavior tests that validate results by querying the backend (e.g.,
ls, JSON outputs). - Extended
.github/workflows/integration.ymlsmoke test list with 2 fast option-behavior checks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/cli/tests/integration.rs | Adds new integration test module verifying option semantics for cp/mv/rm/head/find/share. |
| .github/workflows/integration.yml | Adds two option behavior tests to the RustFS-latest smoke test set. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
This PR continues the test hardening effort by adding behavior-level integration coverage for key command options and extending smoke validation to include option semantics.
What Changed
crates/cli/tests/integration.rs:option_behavior_operationstest_cp_dry_run_does_not_create_target_objecttest_mv_dry_run_keeps_source_and_skips_targettest_rm_dry_run_does_not_delete_objecttest_head_bytes_returns_prefix_bytestest_find_count_json_reports_match_counttest_share_upload_generates_upload_url_with_expiration.github/workflows/integration.ymlwith 2 fast option-behavior checks:option_behavior_operations::test_cp_dry_run_does_not_create_target_objectoption_behavior_operations::test_head_bytes_returns_prefix_bytesWhy
The previous round established command/option discoverability contracts (
--help) but still lacked runtime verification that options actually change behavior correctly. This PR closes that gap for high-risk and high-frequency options (--dry-run,--bytes,--count, upload URL generation).Validation
All required checks passed locally:
cargo fmt --all --checkcargo clippy --workspace -- -D warningscargo test --workspacecargo test --package rustfs-cli --test integration --features integrationReal-backend verification against RustFS latest-compatible endpoint:
TEST_S3_ENDPOINT=http://localhost:9000TEST_S3_ACCESS_KEY=accesskeyTEST_S3_SECRET_KEY=secretkeycargo test --package rustfs-cli --test integration --features integration option_behavior_operations:: -- --test-threads=1Smoke sequence replay (same env) with updated list:
object_operations::test_upload_and_download_small_fileobject_operations::test_move_recursive_prefix_s3_to_s3quota_operations::test_bucket_quota_set_info_clearoption_behavior_operations::test_cp_dry_run_does_not_create_target_objectoption_behavior_operations::test_head_bytes_returns_prefix_bytesAll smoke items passed.
Scope