Test touch ups

pull/2315/head
Kieran Prasch 2020-09-29 20:37:02 -07:00
parent cba680fc1e
commit 1e63ce6b2c
3 changed files with 9 additions and 8 deletions

View File

@ -225,7 +225,7 @@ group_actor_options = group_options(
provider_uri=option_provider_uri(),
gas_strategy=option_gas_strategy,
signer_uri=option_signer_uri,
contract_name=option_contract_name(required=True),
contract_name=option_contract_name(required=False), # TODO: Make this required see Issue #2314
poa=option_poa,
force=option_force,
hw_wallet=option_hw_wallet,
@ -391,7 +391,7 @@ def upgrade(general_config, actor_options, retarget, target_address, ignore_depl
raise click.BadArgumentUsage(message="--target-address is required when using --retarget")
if not actor_options.force:
click.confirm(CONFIRM_RETARGET.format(contract_name=contract_name, target_address=target_address), abort=True)
receipt = ADMINISTRATOR.retarget_proxy(contract_name=contract_name,target_address=target_address)
receipt = ADMINISTRATOR.retarget_proxy(contract_name=contract_name,target_address=target_address, confirmations=0)
message = SUCCESSFUL_RETARGET.format(contract_name=contract_name, target_address=target_address)
emitter.message(message, color='green')
paint_receipt_summary(emitter=emitter, receipt=receipt)

View File

@ -92,9 +92,9 @@ def test_upgrade_contracts(click_runner, test_registry_source_manager, test_regi
cli_action = 'upgrade'
base_command = ('--registry-infile', registry_filepath,
'--provider', TEST_PROVIDER_URI,
'--confirmations', 30,
'--confirmations', 1,
'--network', TEMPORARY_DOMAIN,
'--force') # skip some preflights
'--force') # skip registry preflight for tests
#
# Stage Upgrades

View File

@ -19,6 +19,7 @@
import os
import pytest
from nucypher.config.constants import TEMPORARY_DOMAIN
from nucypher.blockchain.eth.clients import EthereumClient
from nucypher.blockchain.eth.agents import (AdjudicatorAgent, ContractAgency, PolicyManagerAgent, StakingEscrowAgent)
from nucypher.blockchain.eth.constants import (ADJUDICATOR_CONTRACT_NAME, DISPATCHER_CONTRACT_NAME,
@ -52,7 +53,6 @@ def test_nucypher_deploy_inspect_no_deployments(click_runner, testerchain, new_l
assert 'not enrolled' in result.output
@pytest.mark.skip('See Issue #2314')
def test_set_range(click_runner, testerchain, agency_local_registry):
minimum, default, maximum = 10, 20, 30
@ -93,7 +93,7 @@ def test_nucypher_deploy_inspect_fully_deployed(click_runner, agency_local_regis
assert policy_agent.owner in result.output
assert adjudicator_agent.owner in result.output
minimum, default, maximum = 10, 10, 10 # TODO: Fix with skipped test see Issue #2314
minimum, default, maximum = 10, 10, 10 # TODO: Fix with skipped test see Issue #2314
assert 'Range' in result.output
assert f"{minimum} wei" in result.output
assert f"{default} wei" in result.output
@ -210,7 +210,8 @@ def test_manual_proxy_retargeting(monkeypatch, testerchain, click_runner, token_
'--target-address', untargeted_deployment.address,
'--provider', TEST_PROVIDER_URI,
'--registry-infile', ALTERNATE_REGISTRY_FILEPATH,
'--confirmations', 4)
'--confirmations', 4,
'--network', TEMPORARY_DOMAIN)
# Upgrade
user_input = '0\n' + 'Y\n' + 'Y\n'
@ -244,7 +245,7 @@ def test_batch_deposits(click_runner,
deploy_command,
input=user_input,
catch_exceptions=False)
assert result.exit_code == 0
assert result.exit_code == 0, result.output
for allocation_address in testerchain.unassigned_accounts:
assert allocation_address in result.output