Added test for the config file.
This commit is contained in:
		@@ -13,6 +13,7 @@ impl Settings {
 | 
				
			|||||||
        let s = Config::builder()
 | 
					        let s = Config::builder()
 | 
				
			||||||
            .set_default("port", 9090)?
 | 
					            .set_default("port", 9090)?
 | 
				
			||||||
            .set_default("address", "127.0.0.1")?
 | 
					            .set_default("address", "127.0.0.1")?
 | 
				
			||||||
 | 
					            .add_source(config::File::with_name("morethantext").required(false))
 | 
				
			||||||
            .add_source(
 | 
					            .add_source(
 | 
				
			||||||
                config::Environment::with_prefix("MTT")
 | 
					                config::Environment::with_prefix("MTT")
 | 
				
			||||||
                    .try_parsing(true)
 | 
					                    .try_parsing(true)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,6 +9,13 @@ Feature: Server Start
 | 
				
			|||||||
		Then the status should be OK
 | 
							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
 | 
							Given a server
 | 
				
			||||||
		And port is changed to something different
 | 
							And port is changed to something different
 | 
				
			||||||
		And environment variables are used
 | 
							And environment variables are used
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user