PRDONE-94: updated to set dotenv variables as system properties

This commit is contained in:
Tim Chamberlain
2022-08-30 12:28:40 -05:00
parent 4c2ebf8a94
commit dcea96579c
2 changed files with 22 additions and 17 deletions

View File

@ -104,15 +104,16 @@ class ConnectionManagerTest
private RDBMSBackendMetaData getAuroraBacked()
{
Dotenv dotenv = Dotenv.configure()
.systemProperties()
.ignoreIfMissing()
.load();
return new RDBMSBackendMetaData()
.withName("aurora-test")
.withVendor(dotenv.get("RDBMS_VENDOR"))
.withHostName(dotenv.get("RDBMS_HOSTNAME"))
.withPort(Integer.valueOf(Objects.requireNonNull(dotenv.get("RDBMS_PORT"))))
.withDatabaseName(dotenv.get("RDBMS_DATABASE_NAME"))
.withUsername(dotenv.get("RDBMS_USERNAME"))
.withPassword(dotenv.get("RDBMS_PASSWORD"));
.withVendor(System.getProperty("RDBMS_VENDOR"))
.withHostName(System.getProperty("RDBMS_HOSTNAME"))
.withPort(Integer.valueOf(Objects.requireNonNull(System.getProperty("RDBMS_PORT"))))
.withDatabaseName(System.getProperty("RDBMS_DATABASE_NAME"))
.withUsername(System.getProperty("RDBMS_USERNAME"))
.withPassword(System.getProperty("RDBMS_PASSWORD"));
}
}