add more tests to verify network state replacement

This commit is contained in:
jangko 2022-10-15 08:49:11 +07:00
parent 8115885b6e
commit cc52ef35e4
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 4 additions and 2 deletions

View File

@ -90,5 +90,7 @@ suite "Testing protocol handlers":
test "Override network state": test "Override network state":
let rng = newRng() let rng = newRng()
var node = setupTestNode(rng, hah) var node = setupTestNode(rng, hah)
node.addCapability(hah, network()) node.addCapability(hah, network(count: 3))
node.replaceNetworkState(hah, network()) check node.protocolState(hah).count == 3
node.replaceNetworkState(hah, network(count: 7))
check node.protocolState(hah).count == 7