Added test for the config file.

This commit is contained in:
Jeff Baskin 2022-06-19 00:42:44 -04:00
parent 8701adbd57
commit 5de4e94a6f
2 changed files with 9 additions and 1 deletions

View File

@ -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)

View File

@ -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