-
Notifications
You must be signed in to change notification settings - Fork 43
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
Tracker Checker: pass configuration with env var #657
Merged
josecelano
merged 4 commits into
torrust:develop
from
josecelano:656-tracker-checker-pass-configuration-with-env-var
Jan 30, 2024
Merged
Tracker Checker: pass configuration with env var #657
josecelano
merged 4 commits into
torrust:develop
from
josecelano:656-tracker-checker-pass-configuration-with-env-var
Jan 30, 2024
Conversation
This file contains 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
josecelano
added
Testing
Checking Torrust
- Admin -
Enjoyable to Install and Setup our Software
labels
Jan 29, 2024
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. |
josecelano
force-pushed
the
656-tracker-checker-pass-configuration-with-env-var
branch
from
January 30, 2024 07:15
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 ```
josecelano
force-pushed
the
656-tracker-checker-pass-configuration-with-env-var
branch
from
January 30, 2024 08:52
dab0025
to
1bab582
Compare
… Checker This was we don't even need a temp dir to run E2E tests.
ACK 392ffab |
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_checker
This 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
clap
andanyhow
.TORRUST_TRACKER_CHECKER_CONFIG
.