always require a data key when setting the test wallet

This commit is contained in:
Jude Nelson
2017-03-27 18:11:04 -04:00
parent dc474c96f2
commit 0d9f87427d
13 changed files with 20 additions and 25 deletions

View File

@@ -79,8 +79,6 @@ def scenario( wallets, **kw ):
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.blockstack_client_set_wallet( "0123456789abcdef", wallets[5].privkey, wallets[3].privkey, wallets[4].privkey )
# migrate profiles
res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys )
if 'error' in res:

View File

@@ -78,8 +78,6 @@ def scenario( wallets, **kw ):
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr )
testlib.next_block( **kw )
testlib.blockstack_client_set_wallet( "0123456789abcdef", wallets[5].privkey, wallets[3].privkey, wallets[4].privkey )
# migrate profiles
res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys )
if 'error' in res:

View File

@@ -81,8 +81,6 @@ def scenario( wallets, **kw ):
testlib.blockstack_name_register( "foo.test", wallets[2].privkey, wallets[3].addr, wallet=wallets[3] )
testlib.next_block( **kw )
testlib.blockstack_client_set_wallet( "0123456789abcdef", wallets[5].privkey, wallets[3].privkey, wallets[0].privkey )
# migrate profiles
res = testlib.migrate_profile( "foo.test", proxy=test_proxy, wallet_keys=wallet_keys )
if 'error' in res:

View File

@@ -50,7 +50,7 @@ def scenario( wallets, **kw ):
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[4].privkey )
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
if 'error' in resp:
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)

View File

@@ -73,7 +73,7 @@ def scenario( wallets, **kw ):
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
wallet = testlib.blockstack_client_set_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
wallet = testlib.blockstack_client_set_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[4].privkey )
balance_before = testlib.blockstack_cli_balance()
deposit_info = testlib.blockstack_cli_deposit()

View File

@@ -49,7 +49,7 @@ def scenario( wallets, **kw ):
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[4].privkey )
for j in xrange(0, 3):
resp = testlib.blockstack_cli_register( "foo_%s.test" % j, "0123456789abcdef" )
if 'error' in resp:

View File

@@ -58,8 +58,9 @@ def scenario( wallets, **kw ):
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
# NOTE: the wallets used here used to be wallets[2] and wallets[3]; these were changed in rc-0.14.2
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[4].privkey, wallets[2].privkey )
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
if 'error' in resp:
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)
@@ -113,7 +114,7 @@ def check( state_engine ):
return False
# owned by the right address
owner_address = wallets[3].addr
owner_address = wallets[4].addr
if name_rec['address'] != owner_address or name_rec['sender'] != virtualchain.make_payment_script(owner_address):
print "sender is wrong"
print "%s != %s or %s != %s" % (name_rec['address'], owner_address, name_rec['sender'], virtualchain.make_payment_script(owner_address))

View File

@@ -60,17 +60,17 @@ def scenario( wallets, **kw ):
testlib.next_block( **kw )
# should fail if either are multisig
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[0].privkey, None, exception=False )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[0].privkey, wallets[1].privkey, exception=False )
if 'error' not in wallet:
print "wallet initialized\n%s" % json.dumps(wallet, indent=4, sort_keys=True)
return False
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[4].privkey, None, exception=False )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[4].privkey, wallets[1].privkey, exception=False )
if 'error' not in wallet:
print "wallet initialized\n%s" % json.dumps(wallet, indent=4, sort_keys=True)
return False
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[4].privkey, None, exception=False )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[4].privkey, wallets[1].privkey, exception=False )
if 'error' not in wallet:
print "wallet initialized\n%s" % json.dumps(wallet, indent=4, sort_keys=True)
return False
@@ -82,7 +82,7 @@ def scenario( wallets, **kw ):
return False
# should succeed
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[1].privkey, None, exception=False )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[1].privkey, wallets[1].privkey, exception=False )
if 'error' in wallet:
print "wallet failure: %s" % wallet['error']
return False
@@ -92,17 +92,17 @@ def scenario( wallets, **kw ):
testlib.next_block(**kw)
# multisig should now be supported
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[0].privkey, None, exception=False )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[0].privkey, wallets[1].privkey, exception=False )
if 'error' in wallet:
print "wallet failure: %s" % wallet['error']
return False
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[4].privkey, None, exception=False )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[4].privkey, wallets[1].privkey, exception=False )
if 'error' in wallet:
print "wallet failure: %s" % wallet['error']
return False
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[4].privkey, None, exception=False )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[3].privkey, wallets[4].privkey, wallets[1].privkey, exception=False )
if 'error' in wallet:
print "wallet failure: %s" % wallet['error']
return False
@@ -114,7 +114,7 @@ def scenario( wallets, **kw ):
return False
# should succeed
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[1].privkey, None, exception=False )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[0].privkey, wallets[1].privkey, wallets[1].privkey, exception=False )
if 'error' in wallet:
print "wallet failure: %s" % wallet['error']
return False

View File

@@ -55,7 +55,7 @@ def scenario( wallets, **kw ):
zonefile = blockstack_client.zonefile.make_empty_zonefile('foo.test', wallets[4].pubkey_hex, urls=driver_urls)
zonefile_txt = blockstack_zones.make_zone_file( zonefile, origin='foo.test', ttl=3600 )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[4].privkey )
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef", zonefile=zonefile_txt, recipient_address=wallets[4].addr )
if 'error' in resp:
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)

View File

@@ -52,7 +52,7 @@ def scenario( wallets, **kw ):
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[4].privkey )
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
if 'error' in resp:
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)

View File

@@ -59,7 +59,7 @@ def scenario( wallets, **kw ):
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[0].privkey )
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
if 'error' in resp:
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)

View File

@@ -59,7 +59,7 @@ def scenario( wallets, **kw ):
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[0].privkey )
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
if 'error' in resp:
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)

View File

@@ -59,7 +59,7 @@ def scenario( wallets, **kw ):
testlib.blockstack_namespace_ready( "test", wallets[1].privkey )
testlib.next_block( **kw )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, None )
wallet = testlib.blockstack_client_initialize_wallet( "0123456789abcdef", wallets[2].privkey, wallets[3].privkey, wallets[0].privkey )
resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" )
if 'error' in resp:
print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True)