Tracker Checker: pass configuration with env var#657
Merged
josecelano merged 4 commits intotorrust:developfrom Jan 30, 2024
Merged
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #657 +/- ##
===========================================
- Coverage 75.05% 74.81% -0.24%
===========================================
Files 136 136
Lines 8902 8930 +28
===========================================
Hits 6681 6681
- Misses 2221 2249 +28 ☔ View full report in Codecov by Sentry. |
91f5c9f to
8543190
Compare
We will need "env" clap feature to use env variables for arguments.
Run providing a config file path: ```text cargo run --bin tracker_checker -- --config-path "./share/default/config/tracker_checker.json" TORRUST_CHECKER_CONFIG_PATH="./share/default/config/tracker_checker.json" cargo run --bin tracker_checker ``` Run providing the configuration: ```text TORRUST_CHECKER_CONFIG=$(cat "./share/default/config/tracker_checker.json") cargo run --bin tracker_checker ```
dab0025 to
1bab582
Compare
… Checker This was we don't even need a temp dir to run E2E tests.
Member
Author
|
ACK 392ffab |
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.
Allows passing the configuration with an env var:
Run providing a config file path (option or env var):
Run providing the configuration:
TORRUST_CHECKER_CONFIG=$(cat "./share/default/config/tracker_checker.json") cargo run --bin tracker_checkerThis way we don't need to create a temp file in CI. See https://github.com/torrust/torrust-tracker/blob/develop/src/e2e/runner.rs#L71-L73
Subtasks
clapandanyhow.TORRUST_TRACKER_CHECKER_CONFIG.