Problem: MigrationElection needs CLI methods

Solution: Updated the definition of `election` to include the new `migration` type
This commit is contained in:
z-bowen 2018-09-12 13:28:14 +02:00
parent 023fa620f2
commit bac26c4a1d
2 changed files with 11 additions and 0 deletions

View File

@ -16,5 +16,14 @@ elections = {
'help': 'Path to the private key of the election initiator.'
}
}
},
'migration': {
'help': 'Call for a halt to block production to allow for a version change across breaking changes.',
'args': {
'--private-key': {
'dest': 'sk',
'help': 'Path to the private key of the election initiator.'
}
}
}
}

View File

@ -26,6 +26,8 @@ def test_make_sure_we_dont_remove_any_command():
assert parser.parse_args(['start']).command
assert parser.parse_args(['election', 'new', 'upsert-validator', 'TEMP_PUB_KEYPAIR', '10', 'TEMP_NODE_ID',
'--private-key', 'TEMP_PATH_TO_PRIVATE_KEY']).command
assert parser.parse_args(['election', 'new', 'migration',
'--private-key', 'TEMP_PATH_TO_PRIVATE_KEY']).command
assert parser.parse_args(['election', 'approve', 'ELECTION_ID', '--private-key',
'TEMP_PATH_TO_PRIVATE_KEY']).command
assert parser.parse_args(['election', 'show', 'ELECTION_ID']).command