Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration Tests - Replace "echo" in the tests with "log INFO" #31

Open
karolh2000 opened this issue Nov 16, 2022 · 2 comments
Open

Integration Tests - Replace "echo" in the tests with "log INFO" #31

karolh2000 opened this issue Nov 16, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@karolh2000
Copy link
Member

Suggestion details

Since we introduced a logger framework in the integration tests we should go ahead and replace all log messages which are printed with "echo" with "log INFO".

Additional details

No response

@karolh2000 karolh2000 added the enhancement New feature or request label Nov 16, 2022
@betarelease betarelease added the good first issue Good for newcomers label Dec 15, 2022
@betarelease betarelease added this to the 0.2.3 milestone Dec 20, 2022
@betarelease betarelease transferred this issue from pyrsia/pyrsia Dec 21, 2022
@efrisch
Copy link
Member

efrisch commented Jan 9, 2023

@karolh2000 Do we want to do this globally? I found load '../lib/logger/load' so I know we would add that to any script that's missing it (right?), and then just echo becomes log INFO? Sometimes there's a mix. For example,

From bats/tests/common-setup.bash:

  log INFO "Integration tests are running using this version of Pyrsia: ${latest_commit}"
  log INFO "For more details, refer to https://github.com/pyrsia/pyrsia/commit/$(echo "${latest_commit}" | awk '{print $1}') (This link works properly only when you test pyrsia/pyrsia repository.)"

  echo "Building the Pyrsia CLI sources (Pyrsia CLI source dir: $PYRSIA_TEMP_DIR), it might take a while..." >&3
  cargo build -q --profile=release --package=pyrsia_cli --manifest-path=$PYRSIA_TEMP_DIR/Cargo.toml

@karolh2000
Copy link
Member Author

@karolh2000 Do we want to do this globally? I found load '../lib/logger/load' so I know we would add that to any script that's missing it (right?), and then just echo becomes log INFO? Sometimes there's a mix. For example,

From bats/tests/common-setup.bash:

  log INFO "Integration tests are running using this version of Pyrsia: ${latest_commit}"
  log INFO "For more details, refer to https://github.com/pyrsia/pyrsia/commit/$(echo "${latest_commit}" | awk '{print $1}') (This link works properly only when you test pyrsia/pyrsia repository.)"

  echo "Building the Pyrsia CLI sources (Pyrsia CLI source dir: $PYRSIA_TEMP_DIR), it might take a while..." >&3
  cargo build -q --profile=release --package=pyrsia_cli --manifest-path=$PYRSIA_TEMP_DIR/Cargo.toml

@efrisch log.info/debug was introduced later on to reduce the amount of info printed if not in the "debug" mode. Unfortunately, we have a legacy code that uses echo. Basically this issue serves as a reminder to replace "echo" with "log.info/debug" where possible.

@betarelease betarelease modified the milestones: 0.2.3, 0.2.5 Jan 10, 2023
@betarelease betarelease moved this from To do to Backlog in Pyrsia Development Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Backlog
Development

No branches or pull requests

5 participants