one more test (#3821)

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
pull/3829/head
Sally MacFarlane 3 years ago committed by GitHub
parent 2cf97a0e67
commit a898764afe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AllowlistWithDnsPersistorAcceptanceTest.java

@ -79,11 +79,24 @@ public class AllowlistWithDnsPersistorAcceptanceTest extends AcceptanceTestBase
perm.expectPermissioningAllowlistFileKeyValue(
ALLOWLIST_TYPE.NODES, tempFile, ENODE_LOCALHOST_DNS));
// expect an exception whe adding using hostname, since this node is already added with IP
// expect an exception when adding using hostname, since this node is already added with IP
final Condition condition = perm.addNodesToAllowlist(ENODE_LOCALHOST_DNS);
assertThatThrownBy(() -> node.verify(condition)).isInstanceOf(RuntimeException.class);
}
@Test
public void addingEnodeWithHostname_andThenAddingSameEnodeWithIp_shouldThrow() {
node.verify(perm.addNodesToAllowlist(ENODE_LOCALHOST_DNS));
node.verify(
perm.expectPermissioningAllowlistFileKeyValue(
ALLOWLIST_TYPE.NODES, tempFile, ENODE_LOCALHOST_DNS));
// expect an exception when adding using IP, since this node is already added with hostname
final Condition condition = perm.addNodesToAllowlist(ENODE_LOCALHOST_IP);
assertThatThrownBy(() -> node.verify(condition)).isInstanceOf(RuntimeException.class);
}
@Test
public void addingEnodeWithHostNameShouldWorkWhenDnsEnabled() {

Loading…
Cancel
Save