Skip to content

Can't pass system env to properties file #526

Description

@tomunix2000

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions