Skip to content

Commit

Permalink
AKI-614
Browse files Browse the repository at this point in the history
  Fixed command line can't assign the database vendor
  • Loading branch information
AionJayT committed Dec 11, 2019
1 parent 22ae10e commit 8e2387b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modAionImpl/src/org/aion/zero/impl/cli/EditCli.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private boolean updateInternalTx(CfgDb cfgDb) {

private boolean updateVendor(CfgDb cfgDb) {
if (vendor != null && !vendor.equals(DBVendor.fromString(cfgDb.getVendor()))) {
cfgDb.setVendor(vendor.name());
cfgDb.setVendor(vendor.name().toLowerCase());
System.out.println("Updated database vendor to: " + vendor.toString().toLowerCase());
return true;
} else {
Expand Down
3 changes: 2 additions & 1 deletion modAionImpl/test/org/aion/zero/impl/cli/EditCliTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ public void testUpdateCommand(Integer port,
assertThat(cfg.getConsensus().getMining()).isEqualTo(mining);
assertThat(cfg.getApi().getRpc().isActive()).isEqualTo(jsonRPC);
assertThat(cfg.getApi().getZmq().getActive()).isEqualTo(javaAPI);
assertThat(cfg.getDb().getVendor()).ignoringCase().isEqualTo(vendor.name());
assertThat(cfg.getDb().getVendor()).isEqualTo(vendor.name().toLowerCase());
assertThat(cfg.getDb().getVendor().toUpperCase()).isEqualTo(vendor.name());
assertThat(cfg.getDb().getPrune_option()).isEqualTo(prune);
assertThat(cfg.getDb().isInternalTxStorageEnabled()).isEqualTo(internalTxStorage);
assertThat(cfg.getDb().getPrune()).isEqualTo(pruneFromEnum(prune));
Expand Down

0 comments on commit 8e2387b

Please sign in to comment.