diff --git a/src/settings.rs b/src/settings.rs index 014d18e..e626b3c 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -13,6 +13,7 @@ impl Settings { let s = Config::builder() .set_default("port", 9090)? .set_default("address", "127.0.0.1")? + .add_source(config::File::with_name("morethantext").required(false)) .add_source( config::Environment::with_prefix("MTT") .try_parsing(true) diff --git a/tests/features/server_start.feature b/tests/features/server_start.feature index ab96997..ac33727 100644 --- a/tests/features/server_start.feature +++ b/tests/features/server_start.feature @@ -8,7 +8,14 @@ Feature: Server Start When the home page is accessed Then the status should be OK - Scenario: Start using the server on another port + Scenario: Start using the server on another port + Given a server + And port is changed to something different + And it is running + When the home page is accessed + Then the status should be OK + + Scenario: Using environment variables use another port Given a server And port is changed to something different And environment variables are used