Skip to content

Commit

Permalink
✅ : add tests for envVars
Browse files Browse the repository at this point in the history
  • Loading branch information
juwit committed Jun 17, 2019
1 parent c610698 commit b77c5e9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/test/java/io/codeka/gaia/bo/SettingsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

@SpringBootTest(classes = Settings.class)
@EnableConfigurationProperties
@TestPropertySource(properties = "gaia.externalUrl=http://172.17.0.1:8080")
@TestPropertySource(properties = {
"gaia.externalUrl=http://172.17.0.1:8080",
"gaia.envVars[0].name=test",
"gaia.envVars[0].value=value"
})
class SettingsTest {

@Autowired
Expand All @@ -31,4 +35,10 @@ void dockerDaemonUrl_shouldBeConfigurableViaProperty(){
assertEquals("unix:///var/run/docker.sock", settings.getDockerDaemonUrl());
}

@Test
void envVars_shouldBeConfigurableViaProperty(){
assertEquals("test", settings.getEnvVars().get(0).name);
assertEquals("value", settings.getEnvVars().get(0).value);
}

}

0 comments on commit b77c5e9

Please # to comment.