FuelLabs/sway

E2E test CLI flag/doc SWAY_TEST_VERBOSE inconsistency

Open

#3,174 建立於 2022年10月27日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Rust (61,702 star) (5,421 fork)batch import
P: lowgood first issuetesting

描述

Take the following sets of commands:

export SWAY_TEST_VERBOSE=1
cargo run --bin test

Now produces:

error: '1' isn't a valid value for '--verbose'
  [possible values: true, false]
When setting the env var `SWAY_TEST_VERBOSE=1` and running `cargo run --bin test`

Which is a breaking but reasonable change from the previous behavior.

The main issue is that the help text still documents the previous value (=1):

Usage: test [OPTIONS] [REGEX]

Arguments:
  [REGEX]  Only run tests matching this regex

Options:
  -e, --exclude <REGEX>     Exclude tests matching this regex
  -s, --skip-until <REGEX>  Skip all tests until a test matches this regex
      --abi-only            Only run tests with ABI JSON output validation [aliases: abi]
      --contract-only       Only run tests that deploy contracts [aliases: contract]
      --first-only          Only run the first test [aliases: first]
      --verbose             Print out warnings and errors [env: SWAY_TEST_VERBOSE=1]
      --locked              Intended for use in `CI` to ensure test lock files are up to date
  -h, --help                Print help information

貢獻者指南