Skip to content

Tracker Checker: pass configuration with env var #656

@josecelano

Description

@josecelano

Parent issue: #637

Currently, you can run the Tracker Checker with:

cargo run --bin tracker_checker "./share/default/config/tracker_checker.json"

Where the config json file is:

{
    "udp_trackers": [
        "127.0.0.1:6969"
    ],
    "http_trackers": [
        "http://127.0.0.1:7070"
    ],
    "health_checks": [
        "http://127.0.0.1:1313/health_check"
    ]
}

Ideally, we should be able to pass the config with an env var

TORRUST_TRACKER_CHECKER_CONFIG=$(cat ./share/default/config/tracker_checker.json) cargo run --bin tracker_checker "./share/default/config/tracker_checker.json"

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

Metadata

Metadata

Assignees

Labels

TestingChecking Torrust

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions