mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: MigrationElection needed to be added to the allowed operations
Solution: Added it
This commit is contained in:
parent
35191f0ca1
commit
4493cad6d6
@ -343,6 +343,28 @@ def test_election_new_upsert_validator_without_tendermint(caplog, b, priv_valida
|
||||
assert b.get_transaction(election_id)
|
||||
|
||||
|
||||
@pytest.mark.bdb
|
||||
def test_election_new_migration_without_tendermint(caplog, b, priv_validator_path, user_sk):
|
||||
from bigchaindb.commands.bigchaindb import run_election_new_migration
|
||||
|
||||
def mock_write(tx, mode):
|
||||
b.store_bulk_transactions([tx])
|
||||
return (202, '')
|
||||
|
||||
b.get_validators = mock_get_validators
|
||||
b.write_transaction = mock_write
|
||||
|
||||
args = Namespace(action='new',
|
||||
election_type='migration',
|
||||
sk=priv_validator_path,
|
||||
config={})
|
||||
|
||||
with caplog.at_level(logging.INFO):
|
||||
election_id = run_election_new_migration(args, b)
|
||||
assert caplog.records[0].msg == '[SUCCESS] Submitted proposal with id: ' + election_id
|
||||
assert b.get_transaction(election_id)
|
||||
|
||||
|
||||
@pytest.mark.bdb
|
||||
def test_election_new_upsert_validator_invalid_election(caplog, b, priv_validator_path, user_sk):
|
||||
from bigchaindb.commands.bigchaindb import run_election_new_upsert_validator
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user