FuelLabs/sway

E2E test CLI flag/doc SWAY_TEST_VERBOSE inconsistency

开放

#3,174 创建于 2022年10月27日

 (3 条评论) (0 个反应) (0 位负责人)Rust (5,421 个派生)batch import
P: lowgood first issuetesting

仓库指标

星标
 (61,702 个星标)
PR 合并指标
 (平均合并 22小时 6分钟) (30 天内合并 16 个 PR)

描述

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

贡献者指南