FuelLabs/sway

E2E test CLI flag/doc SWAY_TEST_VERBOSE inconsistency

Open

#3 174 ouverte le 27 oct. 2022

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)Rust (5 421 forks)batch import
P: lowgood first issuetesting

Métriques du dépôt

Stars
 (61 702 stars)
Métriques de merge PR
 (Merge moyen 22h 6m) (16 PRs mergées en 30 j)

Description

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

Guide contributeur