forked from hyperledger/indy-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check that demoted node should not be included to the upgrade schedule (
hyperledger#532) * Check that demoted node should not be included to the upgrade schedule Signed-off-by: dsurnin <[email protected]> * Remove whitespace - fix flake warn Signed-off-by: dsurnin <[email protected]>
- Loading branch information
1 parent
1b5a6b1
commit f67a5ad
Showing
4 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
indy_node/test/upgrade/test_upgrade_pool_with_demoted_nodes.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from indy_node.test import waits | ||
from stp_core.loop.eventually import eventually | ||
from plenum.common.constants import ALIAS, SERVICES, VERSION | ||
from indy_common.constants import SCHEDULE | ||
from indy_node.test.upgrade.helper import ensureUpgradeSent, checkUpgradeScheduled | ||
|
||
from plenum.test.pool_transactions.helper import updateNodeData | ||
from plenum.test.conftest import pool_txn_stewards_data, stewards_and_wallets | ||
|
||
|
||
def test_update_with_demoted_node(looper, nodeSet, validUpgrade, | ||
stewards_and_wallets, trustee, trusteeWallet): | ||
# demote one node | ||
node_steward_cl, steward_wallet = stewards_and_wallets[3] | ||
node_data = { | ||
ALIAS: nodeSet[3].name, | ||
SERVICES: [] | ||
} | ||
updateNodeData(looper, node_steward_cl, steward_wallet, nodeSet[3], node_data) | ||
|
||
# remove demoted node from upgrade schedule | ||
upgr = validUpgrade | ||
del upgr[SCHEDULE][nodeSet[3].id] | ||
|
||
# send upgrade | ||
ensureUpgradeSent(looper, trustee, trusteeWallet, upgr) | ||
|
||
# check upg scheduled | ||
looper.run(eventually(checkUpgradeScheduled, nodeSet[:3], upgr[VERSION], retryWait=1, | ||
timeout=waits.expectedUpgradeScheduled())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters