Skip to content

Commit

Permalink
microprofile working
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikebbers committed Nov 8, 2024
1 parent 262a60d commit df51547
Showing 1 changed file with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,27 @@ public TestConfigSource() {
properties = new HashMap<>();
properties.put("mp.initializer.allow", "true");
properties.put("mp.initializer.no-warn", "true");
properties.put("hedera.accountId", dotenv.get("hedera.accountId"));
properties.put("hedera.privateKey", dotenv.get("hedera.privateKey"));
properties.put("hedera.network", dotenv.get("hedera.network"));

final String hederaAccountIdByEnv = System.getenv("HEDERA_ACCOUNT_ID");
if (hederaAccountIdByEnv != null) {
properties.put("hedera.accountId", hederaAccountIdByEnv);
} else {
properties.put("hedera.accountId", dotenv.get("hedera.accountId"));
}

final String hederaPrivateKeyByEnv = System.getenv("HEDERA_PRIVATE_KEY");
if (hederaPrivateKeyByEnv != null) {
properties.put("hedera.privateKey", hederaPrivateKeyByEnv);
} else {
properties.put("hedera.privateKey", dotenv.get("hedera.privateKey"));
}

final String hederaNetwork = System.getenv("HEDERA_NETWORK");
if (hederaNetwork != null) {
properties.put("hedera.network", hederaNetwork);
} else {
properties.put("hedera.network", dotenv.get("hedera.network"));
}
}

@Override
Expand Down

0 comments on commit df51547

Please sign in to comment.