diff --git a/.env.local b/.env.local index c970e247..3122ef20 100644 --- a/.env.local +++ b/.env.local @@ -1,6 +1,6 @@ DATABASE_URL=sqlite://storage/database/data.db?mode=rwc -TORRUST_INDEX_CONFIG= -TORRUST_INDEX_AUTH_SECRET_KEY=MaxVerstappenWC2021 +TORRUST_INDEX_CONFIG_TOML= +TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY=MaxVerstappenWC2021 USER_ID=1000 TORRUST_TRACKER_CONFIG_TOML= TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER=Sqlite3 diff --git a/Containerfile b/Containerfile index c1b89791..0c09684f 100644 --- a/Containerfile +++ b/Containerfile @@ -97,13 +97,13 @@ FROM gcr.io/distroless/cc-debian12:debug as runtime RUN ["/busybox/cp", "-sp", "/busybox/sh","/busybox/cat","/busybox/ls","/busybox/env", "/bin/"] COPY --from=gcc --chmod=0555 /usr/local/bin/su-exec /bin/su-exec -ARG TORRUST_INDEX_PATH_CONFIG="/etc/torrust/index/index.toml" +ARG TORRUST_INDEX_CONFIG_TOML_PATH="/etc/torrust/index/index.toml" ARG TORRUST_INDEX_DATABASE_DRIVER="Sqlite3" ARG USER_ID=1000 ARG API_PORT=3001 ARG IMPORTER_API_PORT=3002 -ENV TORRUST_INDEX_PATH_CONFIG=${TORRUST_INDEX_PATH_CONFIG} +ENV TORRUST_INDEX_CONFIG_TOML_PATH=${TORRUST_INDEX_CONFIG_TOML_PATH} ENV TORRUST_INDEX_DATABASE_DRIVER=${TORRUST_INDEX_DATABASE_DRIVER} ENV USER_ID=${USER_ID} ENV API_PORT=${API_PORT} diff --git a/README.md b/README.md index 60348b37..7bbfba2d 100644 --- a/README.md +++ b/README.md @@ -83,14 +83,14 @@ cp ./share/default/config/index.development.sqlite3.toml ./storage/index/etc/ind vim ./storage/index/etc/index.toml # Run the index with the updated configuration: -TORRUST_INDEX_PATH_CONFIG="./storage/index/etc/index.toml" cargo run +TORRUST_INDEX_CONFIG_TOML_PATH="./storage/index/etc/index.toml" cargo run ``` _Optionally, you may choose to supply the entire configuration as an environmental variable:_ ```sh # Use a configuration supplied on an environmental variable: -TORRUST_INDEX_CONFIG=$(cat "./storage/index/etc/index.toml") cargo run +TORRUST_INDEX_CONFIG_TOML=$(cat "./storage/index/etc/index.toml") cargo run ``` _For deployment, you __should__ override: @@ -100,9 +100,9 @@ _For deployment, you __should__ override: ```sh # Please use the secret that you generated for the torrust-tracker configuration. # Override secret in configuration using an environmental variable -TORRUST_INDEX_CONFIG=$(cat "./storage/index/etc/index.toml") \ - TORRUST_INDEX_TRACKER_API_TOKEN=$(cat "./storage/tracker/lib/tracker_api_admin_token.secret") \ - TORRUST_INDEX_AUTH_SECRET_KEY="MaxVerstappenWC2021" \ +TORRUST_INDEX_CONFIG_TOML=$(cat "./storage/index/etc/index.toml") \ + TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN=$(cat "./storage/tracker/lib/tracker_api_admin_token.secret") \ + TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY="MaxVerstappenWC2021" \ cargo run ``` diff --git a/compose.yaml b/compose.yaml index ecac7447..002053a2 100644 --- a/compose.yaml +++ b/compose.yaml @@ -9,11 +9,11 @@ services: tty: true environment: - USER_ID=${USER_ID} - - TORRUST_INDEX_CONFIG=${TORRUST_INDEX_CONFIG} + - TORRUST_INDEX_CONFIG_TOML=${TORRUST_INDEX_CONFIG_TOML} - TORRUST_INDEX_DATABASE=${TORRUST_INDEX_DATABASE:-e2e_testing_sqlite3} - TORRUST_INDEX_DATABASE_DRIVER=${TORRUST_INDEX_DATABASE_DRIVER:-sqlite3} - - TORRUST_INDEX_TRACKER_API_TOKEN=${TORRUST_INDEX_TRACKER_API_TOKEN:-MyAccessToken} - - TORRUST_INDEX_AUTH_SECRET_KEY=${TORRUST_INDEX_AUTH_SECRET_KEY:-MaxVerstappenWC2021} + - TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN=${TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN:-MyAccessToken} + - TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY=${TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY:-MaxVerstappenWC2021} networks: - server_side ports: diff --git a/contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh b/contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh index 54123056..8e0c05f4 100755 --- a/contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh +++ b/contrib/dev-tools/container/e2e/mysql/e2e-env-down.sh @@ -1,5 +1,5 @@ #!/bin/bash -TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.mysql.toml) \ +TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.e2e.container.mysql.toml) \ TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \ docker compose down diff --git a/contrib/dev-tools/container/e2e/mysql/e2e-env-up.sh b/contrib/dev-tools/container/e2e/mysql/e2e-env-up.sh index f1d6f82c..a865d4a2 100755 --- a/contrib/dev-tools/container/e2e/mysql/e2e-env-up.sh +++ b/contrib/dev-tools/container/e2e/mysql/e2e-env-up.sh @@ -4,10 +4,10 @@ TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.mysql.toml docker compose build USER_ID=${USER_ID:-1000} \ - TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.mysql.toml) \ + TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.e2e.container.mysql.toml) \ TORRUST_INDEX_DATABASE="torrust_index_e2e_testing" \ TORRUST_INDEX_DATABASE_DRIVER="mysql" \ - TORRUST_INDEX_TRACKER_API_TOKEN="MyAccessToken" \ + TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN="MyAccessToken" \ TORRUST_INDEX_MYSQL_DATABASE="torrust_index_e2e_testing" \ TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \ TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \ diff --git a/contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh b/contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh index 395c0df2..79cea17a 100755 --- a/contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh +++ b/contrib/dev-tools/container/e2e/mysql/run-e2e-tests.sh @@ -40,7 +40,7 @@ docker ps # Run E2E tests with shared app instance TORRUST_INDEX_E2E_SHARED=true \ - TORRUST_INDEX_PATH_CONFIG="./share/default/config/index.e2e.container.mysql.toml" \ + TORRUST_INDEX_CONFIG_TOML_PATH="./share/default/config/index.e2e.container.mysql.toml" \ TORRUST_INDEX_E2E_DB_CONNECT_URL="mysql://root:root_secret_password@localhost:3306/torrust_index_e2e_testing" \ cargo test || { diff --git a/contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh b/contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh index 3dfc14e3..da45b824 100755 --- a/contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh +++ b/contrib/dev-tools/container/e2e/sqlite/e2e-env-down.sh @@ -1,5 +1,5 @@ #!/bin/bash -TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \ +TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \ TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \ docker compose down diff --git a/contrib/dev-tools/container/e2e/sqlite/e2e-env-up.sh b/contrib/dev-tools/container/e2e/sqlite/e2e-env-up.sh index e9a424f5..3f744cb4 100755 --- a/contrib/dev-tools/container/e2e/sqlite/e2e-env-up.sh +++ b/contrib/dev-tools/container/e2e/sqlite/e2e-env-up.sh @@ -1,14 +1,14 @@ #!/bin/bash -TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \ +TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \ docker compose build USER_ID=${USER_ID:-1000} \ - TORRUST_INDEX_CONFIG=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \ + TORRUST_INDEX_CONFIG_TOML=$(cat ./share/default/config/index.e2e.container.sqlite3.toml) \ TORRUST_INDEX_DATABASE="e2e_testing_sqlite3" \ TORRUST_INDEX_DATABASE_DRIVER="sqlite3" \ - TORRUST_INDEX_TRACKER_API_TOKEN="MyAccessToken" \ - TORRUST_INDEX_AUTH_SECRET_KEY="MaxVerstappenWC2021" \ + TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN="MyAccessToken" \ + TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY="MaxVerstappenWC2021" \ TORRUST_TRACKER_CONFIG_TOML=$(cat ./share/default/config/tracker.e2e.container.sqlite3.toml) \ TORRUST_TRACKER_DATABASE="e2e_testing_sqlite3" \ TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER="Sqlite3" \ diff --git a/contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh b/contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh index a4d6583c..42b2f7d1 100755 --- a/contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh +++ b/contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh @@ -38,7 +38,7 @@ docker ps # Run E2E tests with shared app instance TORRUST_INDEX_E2E_SHARED=true \ - TORRUST_INDEX_PATH_CONFIG="./share/default/config/index.e2e.container.sqlite3.toml" \ + TORRUST_INDEX_CONFIG_TOML_PATH="./share/default/config/index.e2e.container.sqlite3.toml" \ TORRUST_INDEX_E2E_DB_CONNECT_URL="sqlite://./storage/index/lib/database/e2e_testing_sqlite3.db?mode=rwc" \ cargo test || { diff --git a/contrib/dev-tools/container/run.sh b/contrib/dev-tools/container/run.sh index c967f788..64f7c543 100755 --- a/contrib/dev-tools/container/run.sh +++ b/contrib/dev-tools/container/run.sh @@ -1,11 +1,11 @@ #!/bin/bash USER_ID=${USER_ID:-1000} -TORRUST_INDEX_CONFIG=$(cat config.toml) +TORRUST_INDEX_CONFIG_TOML=$(cat config.toml) docker run -it \ --user="$USER_ID" \ --publish 3001:3001/tcp \ - --env TORRUST_INDEX_CONFIG="$TORRUST_INDEX_CONFIG" \ + --env TORRUST_INDEX_CONFIG_TOML="$TORRUST_INDEX_CONFIG_TOML" \ --volume "$(pwd)/storage":"/app/storage" \ torrust-index diff --git a/docs/containers.md b/docs/containers.md index f356d2f4..5039d363 100644 --- a/docs/containers.md +++ b/docs/containers.md @@ -147,11 +147,11 @@ Environmental variables are loaded through the `--env`, in the format `--env VAR The following environmental variables can be set: -- `TORRUST_INDEX_PATH_CONFIG` - The in-container path to the index configuration file, (default: `"/etc/torrust/index/index.toml"`). -- `TORRUST_INDEX_TRACKER_API_TOKEN` - Override of the admin token. If set, this value overrides any value set in the config. -- `TORRUST_INDEX_AUTH_SECRET_KEY` - Override of the auth secret key. If set, this value overrides any value set in the config. +- `TORRUST_INDEX_CONFIG_TOML_PATH` - The in-container path to the index configuration file, (default: `"/etc/torrust/index/index.toml"`). +- `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN` - Override of the admin token. If set, this value overrides any value set in the config. +- `TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY` - Override of the auth secret key. If set, this value overrides any value set in the config. - `TORRUST_INDEX_DATABASE_DRIVER` - The database type used for the container, (options: `sqlite3`, `mysql`, default `sqlite3`). Please Note: This dose not override the database configuration within the `.toml` config file. -- `TORRUST_INDEX_CONFIG` - Load config from this environmental variable instead from a file, (i.e: `TORRUST_INDEX_CONFIG=$(cat index-index.toml)`). +- `TORRUST_INDEX_CONFIG_TOML` - Load config from this environmental variable instead from a file, (i.e: `TORRUST_INDEX_CONFIG_TOML=$(cat index-index.toml)`). - `USER_ID` - The user id for the runtime crated `torrust` user. Please Note: This user id should match the ownership of the host-mapped volumes, (default `1000`). - `API_PORT` - The port for the index API. This should match the port used in the configuration, (default `3001`). @@ -201,8 +201,8 @@ mkdir -p ./storage/index/lib/ ./storage/index/log/ ./storage/index/etc/ ## Run Torrust Index Container Image docker run -it \ - --env TORRUST_INDEX_TRACKER_API_TOKEN="MySecretToken" \ - --env TORRUST_INDEX_AUTH_SECRET_KEY="MaxVerstappenWC2021" \ + --env TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN="MySecretToken" \ + --env TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY="MaxVerstappenWC2021" \ --env USER_ID="$(id -u)" \ --publish 0.0.0.0:3001:3001/tcp \ --volume ./storage/index/lib:/var/lib/torrust/index:Z \ @@ -222,7 +222,7 @@ mkdir -p ./storage/index/lib/ ./storage/index/log/ ./storage/index/etc/ ## Run Torrust Index Container Image podman run -it \ - --env TORRUST_INDEX_TRACKER_API_TOKEN="MySecretToken" \ + --env TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN="MySecretToken" \ --env USER_ID="$(id -u)" \ --publish 0.0.0.0:3001:3001/tcp \ --volume ./storage/index/lib:/var/lib/torrust/index:Z \ diff --git a/share/default/config/index.container.mysql.toml b/share/default/config/index.container.mysql.toml index 5da07797..7bd934a4 100644 --- a/share/default/config/index.container.mysql.toml +++ b/share/default/config/index.container.mysql.toml @@ -1,6 +1,6 @@ # Please override the following settings with environmental variable! -# tracker::token -> `TORRUST_INDEX_TRACKER_API_TOKEN` -# auth::secret_key -> `TORRUST_INDEX_AUTH_SECRET_KEY` +# tracker::token -> `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN` +# auth::secret_key -> `TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY` log_level = "info" diff --git a/share/default/config/index.container.sqlite3.toml b/share/default/config/index.container.sqlite3.toml index ac1dd71d..77d06a93 100644 --- a/share/default/config/index.container.sqlite3.toml +++ b/share/default/config/index.container.sqlite3.toml @@ -4,7 +4,7 @@ log_level = "info" name = "Torrust" # Please override the tracker token setting the -# `TORRUST_INDEX_TRACKER_API_TOKEN` +# `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN` # environmental variable! [tracker] diff --git a/share/default/config/index.e2e.container.mysql.toml b/share/default/config/index.e2e.container.mysql.toml index b5e85813..beabe832 100644 --- a/share/default/config/index.e2e.container.mysql.toml +++ b/share/default/config/index.e2e.container.mysql.toml @@ -1,6 +1,6 @@ # Please override the following settings with environmental variable! -# tracker::token -> `TORRUST_INDEX_TRACKER_API_TOKEN` -# auth::secret_key -> `TORRUST_INDEX_AUTH_SECRET_KEY` +# tracker::token -> `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN` +# auth::secret_key -> `TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY` log_level = "info" diff --git a/share/default/config/index.e2e.container.sqlite3.toml b/share/default/config/index.e2e.container.sqlite3.toml index 9e220369..e3409ac4 100644 --- a/share/default/config/index.e2e.container.sqlite3.toml +++ b/share/default/config/index.e2e.container.sqlite3.toml @@ -1,6 +1,6 @@ # Please override the following settings with environmental variable! -# tracker::token -> `TORRUST_INDEX_TRACKER_API_TOKEN` -# auth::secret_key -> `TORRUST_INDEX_AUTH_SECRET_KEY` +# tracker::token -> `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN` +# auth::secret_key -> `TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY` log_level = "info" diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index c14454ab..aaef11df 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -17,7 +17,7 @@ pub const ENV_VAR_CORS_PERMISSIVE: &str = "TORRUST_INDEX_API_CORS_PERMISSIVE"; /// There are two methods to inject the configuration: /// /// 1. By using a config file: `index.toml`. -/// 2. Environment variable: `TORRUST_INDEX_CONFIG`. The variable contains the same contents as the `index.toml` file. +/// 2. Environment variable: `TORRUST_INDEX_CONFIG_TOML`. The variable contains the same contents as the `index.toml` file. /// /// Environment variable has priority over the config file. /// @@ -26,7 +26,7 @@ pub const ENV_VAR_CORS_PERMISSIVE: &str = "TORRUST_INDEX_API_CORS_PERMISSIVE"; /// # Panics /// /// Will panic if it can't load the configuration from either -/// `./index.toml` file or the env var `TORRUST_INDEX_CONFIG`. +/// `./index.toml` file or the env var `TORRUST_INDEX_CONFIG_TOML`. #[must_use] pub fn initialize_configuration() -> Configuration { let info = Info::new(DEFAULT_PATH_CONFIG.to_string()).unwrap(); diff --git a/src/config/mod.rs b/src/config/mod.rs index 10648333..420813dc 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -37,17 +37,19 @@ const CONFIG_OVERRIDE_SEPARATOR: &str = "__"; /// The whole `index.toml` file content. It has priority over the config file. /// Even if the file is not on the default path. -pub const ENV_VAR_CONFIG: &str = "TORRUST_INDEX_CONFIG"; +pub const ENV_VAR_CONFIG_TOML: &str = "TORRUST_INDEX_CONFIG_TOML"; -/// Token needed to communicate with the Torrust Tracker -pub const ENV_VAR_API_ADMIN_TOKEN: &str = "TORRUST_INDEX_TRACKER_API_TOKEN"; +/// The `index.toml` file location. +pub const ENV_VAR_CONFIG_TOML_PATH: &str = "TORRUST_INDEX_CONFIG_TOML_PATH"; + +/// Token needed to communicate with the Torrust Tracker. +/// Deprecated. Use `TORRUST_INDEX_CONFIG_OVERRIDE_TRACKER__TOKEN`. +pub const ENV_VAR_TRACKER_API_ADMIN_TOKEN: &str = "TORRUST_INDEX_TRACKER_API_TOKEN"; /// Secret key used to encrypt and decrypt +/// Deprecated. Use `TORRUST_INDEX_CONFIG_OVERRIDE_AUTH__SECRET_KEY`. pub const ENV_VAR_AUTH_SECRET_KEY: &str = "TORRUST_INDEX_AUTH_SECRET_KEY"; -/// The `index.toml` file location. -pub const ENV_VAR_PATH_CONFIG: &str = "TORRUST_INDEX_PATH_CONFIG"; - /// Information required for loading config #[derive(Debug, Default, Clone)] pub struct Info { @@ -66,9 +68,9 @@ impl Info { /// #[allow(clippy::needless_pass_by_value)] pub fn new(default_config_toml_path: String) -> Result { - let env_var_config_toml = ENV_VAR_CONFIG.to_string(); - let env_var_config_toml_path = ENV_VAR_PATH_CONFIG.to_string(); - let env_var_tracker_api_token = ENV_VAR_API_ADMIN_TOKEN.to_string(); + let env_var_config_toml = ENV_VAR_CONFIG_TOML.to_string(); + let env_var_config_toml_path = ENV_VAR_CONFIG_TOML_PATH.to_string(); + let env_var_tracker_api_admin_token = ENV_VAR_TRACKER_API_ADMIN_TOKEN.to_string(); let env_var_auth_secret_key = ENV_VAR_AUTH_SECRET_KEY.to_string(); let config_toml = if let Ok(config_toml) = env::var(env_var_config_toml) { @@ -86,7 +88,7 @@ impl Info { default_config_toml_path }; - let tracker_api_token = env::var(env_var_tracker_api_token).ok(); + let tracker_api_token = env::var(env_var_tracker_api_admin_token).ok(); let auth_secret_key = env::var(env_var_auth_secret_key).ok(); Ok(Self { diff --git a/src/lib.rs b/src/lib.rs index 4f155d12..87455dfe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -215,10 +215,10 @@ //! //! For more information about configuration you can visit the documentation for the [`config`]) module. //! -//! Alternatively to the `config.toml` file you can use one environment variable `TORRUST_INDEX_CONFIG` to pass the configuration to the tracker: +//! Alternatively to the `config.toml` file you can use one environment variable `TORRUST_INDEX_CONFIG_TOML` to pass the configuration to the tracker: //! //! ```text -//! TORRUST_INDEX_CONFIG=$(cat config.toml) +//! TORRUST_INDEX_CONFIG_TOML=$(cat config.toml) //! cargo run //! ``` //! @@ -226,7 +226,7 @@ //! //! The env var contains the same data as the `config.toml`. It's particularly useful in you are [running the index with docker](https://github.com/torrust/torrust-index/tree/develop/docker). //! -//! > **NOTICE**: The `TORRUST_INDEX_CONFIG` env var has priority over the `config.toml` file. +//! > **NOTICE**: The `TORRUST_INDEX_CONFIG_TOML` env var has priority over the `config.toml` file. //! //! > **NOTICE**: You can also change the location for the configuration file with the `TORRUST_INDEX_CONFIG_PATH` env var. //! diff --git a/tests/e2e/config.rs b/tests/e2e/config.rs index 09e61003..be46b7e2 100644 --- a/tests/e2e/config.rs +++ b/tests/e2e/config.rs @@ -21,7 +21,7 @@ pub const ENV_VAR_DB_CONNECT_URL: &str = "TORRUST_INDEX_E2E_DB_CONNECT_URL"; /// There are two methods to inject the configuration: /// /// 1. By using a config file: `index.toml`. -/// 2. Environment variable: `TORRUST_INDEX_CONFIG`. The variable contains the same contents as the `index.toml` file. +/// 2. Environment variable: `TORRUST_INDEX_CONFIG_TOML`. The variable contains the same contents as the `index.toml` file. /// /// Environment variable has priority over the config file. /// @@ -30,7 +30,7 @@ pub const ENV_VAR_DB_CONNECT_URL: &str = "TORRUST_INDEX_E2E_DB_CONNECT_URL"; /// # Panics /// /// Will panic if it can't load the configuration from either -/// `./index.toml` file or the env var `TORRUST_INDEX_CONFIG`. +/// `./index.toml` file or the env var `TORRUST_INDEX_CONFIG_TOML`. #[must_use] pub fn initialize_configuration() -> Configuration { let info = Info::new(DEFAULT_PATH_CONFIG.to_string()).unwrap();