-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:hyperledger/indy-node into imrove…
…s-nightly-builds-logs
- Loading branch information
Showing
5 changed files
with
37 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
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
31 changes: 31 additions & 0 deletions
31
indy_node/test/upgrade/test_node_sustain_invalid_upgrade_txn.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,31 @@ | ||
import pytest | ||
|
||
from indy_node.test.upgrade.conftest import EXT_PKT_NAME, EXT_PKT_VERSION | ||
from plenum.common.exceptions import RequestNackedException | ||
from plenum.test.pool_transactions.helper import sdk_add_new_nym | ||
|
||
from indy_node.test.upgrade.helper import sdk_ensure_upgrade_sent | ||
|
||
|
||
@pytest.fixture | ||
def pckg(request): | ||
return EXT_PKT_NAME, EXT_PKT_VERSION | ||
|
||
|
||
def test_forced_request_validation(looper, txnPoolNodeSet, | ||
sdk_pool_handle, sdk_wallet_steward, | ||
sdk_wallet_trustee, validUpgradeExpForceTrue): | ||
for node in txnPoolNodeSet[2:]: | ||
node.upgrader.check_upgrade_possible = lambda a, b, c: None | ||
for node in txnPoolNodeSet[:2]: | ||
node.upgrader.check_upgrade_possible = lambda a, b, c: 'some exception' | ||
|
||
assert all(n.spylog.getAll('processPropagate') == [] for n in txnPoolNodeSet) | ||
|
||
with pytest.raises(RequestNackedException, match='some exception'): | ||
sdk_ensure_upgrade_sent(looper, sdk_pool_handle, sdk_wallet_trustee, validUpgradeExpForceTrue) | ||
|
||
assert all(len(n.spylog.getAll('processPropagate')) == 2 for n in txnPoolNodeSet[:2]) | ||
assert all(len(n.spylog.getAll('processPropagate')) == 1 for n in txnPoolNodeSet[2:]) | ||
|
||
sdk_add_new_nym(looper, sdk_pool_handle, sdk_wallet_steward) |
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