Can't pass system env to properties file
I have system env from mvn like this: mvn verify -Dskip.it=false -Ddb.username=xxxx -Ddb.password=xxxxx -DpropertyFile=local.properties
My properties app_host.properties is like this:
kafka.producer.properties=kafka_config/${propertyFile}
db.url=jdbc:db2://localhost:60004/QZCSH00
db.username=${db.username}
db.password=${db.password}
db.driver=com.ibm.db2.jcc.DB2Driver
My test case:
@TargetEnv("app_host.properties")
@EnvProperty("_${env}")
@RunWith(ZeroCodeUnitRunner.class)
public class LoadTest {
@Test
@Scenario("scenarios/promotion/produce_promotion_event.json")
public void c_consumeMessage() throws Exception {
}
}
I expect when I run the mvn command, zerocode will replace the properties value with env value kafka.producer.properties=kafka_config/local.properties
But it does not
Fixed. changed in ApplicationMainModule, will submit PR soon
@tomunix2000, Can you please submit a PR for this ApplicationMainModule when you're ready?
@authorjapps I want to work on this issue, but I am new to open source. Would you recommend taking up this issue?