Skip to content

Commit

Permalink
Merge pull request #1841 from rsksmart/update-expected-conf
Browse files Browse the repository at this point in the history
Syncing expected.conf
  • Loading branch information
Vovchyk authored Sep 20, 2022
2 parents 159d59d + f44e3c8 commit 0679f3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rskj-core/src/main/java/co/rsk/config/ConfigLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ private static boolean isActualObjectValid(@Nonnull String keyPath, @Nonnull Con
// if expected object is empty, then the actual object should contain only scalar items
if (isCollectionType(actualEntryValue.valueType())) {
String entryKeyPath = prefix + actualEntryKey;
logger.error("Expected scalar config value for key path `{}`. Actual value is {}. See expected.conf for the expected settings",
logger.warn("Expected scalar config value for key path `{}`. Actual value is {}. See expected.conf for the expected settings",
entryKeyPath, actualEntryValue);
valid = false;
}
} else {
ConfigValue expectedEntryValue = expectedObject.get(actualEntryKey);
String entryKeyPath = prefix + actualEntryKey;
if (expectedEntryValue == null) {
logger.error("Unexpected config value {} for key path `{}`. See expected.conf for the expected settings", actualEntryValue, entryKeyPath);
logger.warn("Unexpected config value {} for key path `{}`. See expected.conf for the expected settings", actualEntryValue, entryKeyPath);
valid = false;
} else {
valid &= isActualValueValid(entryKeyPath, expectedEntryValue, actualEntryValue);
Expand All @@ -219,7 +219,7 @@ private static boolean isActualListValid(@Nonnull String keyPath, @Nonnull Confi
// if expected list is empty, then the actual list should contain only scalar items
if (isCollectionType(actualItem.valueType())) {
String itemKeyPath = keyPath + "[" + index + "]";
logger.error("Expected scalar config value for key path `{}`. Actual value is {}. See expected.conf for the expected settings",
logger.warn("Expected scalar config value for key path `{}`. Actual value is {}. See expected.conf for the expected settings",
itemKeyPath, actualItem);
valid = false;
}
Expand All @@ -243,7 +243,7 @@ private static boolean isActualValueValid(@Nonnull String keyPath, @Nonnull Conf
}

if (expectedValueType != actualValueType) {
logger.error("Config value type mismatch. `{}` has type {}, but should have {}. See expected.conf for the expected settings",
logger.warn("Config value type mismatch. `{}` has type {}, but should have {}. See expected.conf for the expected settings",
keyPath, actualValueType, expectedValueType);
return false;
}
Expand Down
1 change: 1 addition & 0 deletions rskj-core/src/main/resources/expected.conf
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ wallet = {
}]
}
miner = {
gasUnitInDollars = <double>
minGasPrice = <minGasPrice>
server = {
enabled = <enabled>
Expand Down

0 comments on commit 0679f3e

Please sign in to comment.