Skip to content

Commit

Permalink
Merge pull request EOSIO#130 from enumivo/staging
Browse files Browse the repository at this point in the history
rename Eos
  • Loading branch information
Enumivo authored May 18, 2018
2 parents e985cd8 + 4787ed5 commit d1fd6e8
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 107 deletions.
4 changes: 2 additions & 2 deletions tests/consensus-validation-malicious-producers.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def error(msg="", errorCode=1):
dumpErrorDetails=args.dump-error-details
keepLogs=args.keep-logs
amINoon=not args.not_noon
killEosInstances= not args.dont-kill
killEnuInstances= not args.dont-kill
killWallet= not args.dont-kill

testUtils.Utils.Debug=debug
Expand Down Expand Up @@ -373,7 +373,7 @@ def myTest(transWillEnterBlock):
walletMgr.dumpErrorDetails()
Print("== Errors see above ==")

if killEosInstances:
if killEnuInstances:
Print("Shut down the cluster%s" % (" and cleanup." if (testSuccessful and not keepLogs) else "."))
cluster.killall()
walletMgr.killall()
Expand Down
4 changes: 2 additions & 2 deletions tests/distributed-transactions-remote-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def errorExit(msg="", errorCode=1):

testUtils.Utils.Debug=debug

killEosInstances=not dontKill
killEnuInstances=not dontKill
topo="mesh"
delay=1
prodCount=1 # producers per producer node
Expand Down Expand Up @@ -96,7 +96,7 @@ def errorExit(msg="", errorCode=1):
cluster.dumpErrorDetails()
Print("== Errors see above ==")

if killEosInstances:
if killEnuInstances:
Print("Shut down the cluster and cleanup.")
cluster.killall()
cluster.cleanup()
Expand Down
6 changes: 3 additions & 3 deletions tests/distributed-transactions-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def errorExit(msg="", errorCode=1):
dumpErrorDetails=args.dump_error_details

killWallet=not dontKill
killEosInstances=not dontKill
killEnuInstances=not dontKill
if nodesFile is not None:
killEosInstances=False
killEnuInstances=False

testUtils.Utils.Debug=debug
testSuccessful=False
Expand Down Expand Up @@ -118,7 +118,7 @@ def errorExit(msg="", errorCode=1):
cluster.dumpErrorDetails()
Print("== Errors see above ==")

if killEosInstances:
if killEnuInstances:
Print("Shut down the cluster and cleanup.")
cluster.killall()
cluster.cleanup()
Expand Down
4 changes: 2 additions & 2 deletions tests/enunode_run_remote_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def errorExit(msg="", errorCode=1):

testUtils.Utils.Debug=debug

killEosInstances=not dontKill
killEnuInstances=not dontKill
topo="mesh"
delay=1
prodCount=1 # producers per producer node
Expand Down Expand Up @@ -74,7 +74,7 @@ def errorExit(msg="", errorCode=1):
cluster.dumpErrorDetails()
Print("== Errors see above ==")

if killEosInstances:
if killEnuInstances:
Print("Shut down the cluster and cleanup.")
cluster.killall()
cluster.cleanup()
Expand Down
20 changes: 10 additions & 10 deletions tests/enunode_run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def cmdError(name, cmdCode=0, exitNow=False):
parser.add_argument('-?', action='help', default=argparse.SUPPRESS,
help=argparse._('show this help message and exit'))
parser.add_argument("-o", "--output", type=str, help="output file", default=TEST_OUTPUT_DEFAULT)
parser.add_argument("-h", "--host", type=str, help="%s host name" % (testUtils.Utils.EosServerName),
parser.add_argument("-h", "--host", type=str, help="%s host name" % (testUtils.Utils.EnuServerName),
default=LOCAL_HOST)
parser.add_argument("-p", "--port", type=int, help="%s host port" % testUtils.Utils.EosServerName,
parser.add_argument("-p", "--port", type=int, help="%s host port" % testUtils.Utils.EnuServerName,
default=DEFAULT_PORT)
parser.add_argument("-c", "--prod-count", type=int, help="Per node producer count", default=1)
parser.add_argument("--defproducera_prvt_key", type=str, help="defproducera private key.")
Expand Down Expand Up @@ -71,7 +71,7 @@ def cmdError(name, cmdCode=0, exitNow=False):
cluster=testUtils.Cluster(walletd=True, enableMongo=enableMongo, defproduceraPrvtKey=defproduceraPrvtKey, defproducerbPrvtKey=defproducerbPrvtKey)
walletMgr=testUtils.WalletMgr(True)
testSuccessful=False
killEosInstances=not dontKill
killEnuInstances=not dontKill
killWallet=not dontKill

WalletdName="enuwallet"
Expand Down Expand Up @@ -99,7 +99,7 @@ def cmdError(name, cmdCode=0, exitNow=False):
errorExit("Failed to stand up eos cluster.")
else:
cluster.initializeNodes(defproduceraPrvtKey=defproduceraPrvtKey, defproducerbPrvtKey=defproducerbPrvtKey)
killEosInstances=False
killEnuInstances=False

Print("Validating system accounts after bootstrap")
cluster.validateAccounts(None)
Expand Down Expand Up @@ -264,7 +264,7 @@ def cmdError(name, cmdCode=0, exitNow=False):

expectedAmount=transferAmount
Print("Verify transfer, Expected: %s" % (expectedAmount))
actualAmount=node.getAccountEosBalanceStr(testeraAccount.name)
actualAmount=node.getAccountEnuBalanceStr(testeraAccount.name)
if expectedAmount != actualAmount:
cmdError("FAILURE - transfer failed")
errorExit("Transfer verification failed. Excepted %s, actual: %s" % (expectedAmount, actualAmount))
Expand All @@ -279,7 +279,7 @@ def cmdError(name, cmdCode=0, exitNow=False):

expectedAmount="97.5421 EOS"
Print("Verify transfer, Expected: %s" % (expectedAmount))
actualAmount=node.getAccountEosBalanceStr(testeraAccount.name)
actualAmount=node.getAccountEnuBalanceStr(testeraAccount.name)
if expectedAmount != actualAmount:
cmdError("FAILURE - transfer failed")
errorExit("Transfer verification failed. Excepted %s, actual: %s" % (expectedAmount, actualAmount))
Expand Down Expand Up @@ -310,7 +310,7 @@ def cmdError(name, cmdCode=0, exitNow=False):

expectedAmount="98.0311 EOS" # 5000 initial deposit
Print("Verify transfer, Expected: %s" % (expectedAmount))
actualAmount=node.getAccountEosBalanceStr(currencyAccount.name)
actualAmount=node.getAccountEnuBalanceStr(currencyAccount.name)
if expectedAmount != actualAmount:
cmdError("FAILURE - transfer failed")
errorExit("Transfer verification failed. Excepted %s, actual: %s" % (expectedAmount, actualAmount))
Expand Down Expand Up @@ -442,7 +442,7 @@ def cmdError(name, cmdCode=0, exitNow=False):
errorExit("FAILURE - get code currency1111 failed", raw=True)
else:
Print("verify abi is set")
account=node.getEosAccountFromDb(currencyAccount.name)
account=node.getEnuAccountFromDb(currencyAccount.name)
abiName=account["abi"]["structs"][0]["name"]
abiActionName=account["abi"]["actions"][0]["name"]
abiType=account["abi"]["actions"][0]["type"]
Expand Down Expand Up @@ -622,7 +622,7 @@ def cmdError(name, cmdCode=0, exitNow=False):
errorExit("Failed to unlock wallet %s" % (defproduceraWallet.name))

Print("Get account defproducera")
account=node.getEosAccount(defproduceraAccount.name)
account=node.getEnuAccount(defproduceraAccount.name)
if account is None:
cmdError("%s get account" % (ClientName))
errorExit("Failed to get account %s" % (defproduceraAccount.name))
Expand Down Expand Up @@ -697,7 +697,7 @@ def cmdError(name, cmdCode=0, exitNow=False):
walletMgr.dumpErrorDetails()
Print("== Errors see above ==")

if killEosInstances:
if killEnuInstances:
Print("Shut down the cluster.")
cluster.killall()
if testSuccessful and not keepLogs:
Expand Down
20 changes: 10 additions & 10 deletions tests/nodeos_run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def cmdError(name, cmdCode=0, exitNow=False):
parser.add_argument('-?', action='help', default=argparse.SUPPRESS,
help=argparse._('show this help message and exit'))
parser.add_argument("-o", "--output", type=str, help="output file", default=TEST_OUTPUT_DEFAULT)
parser.add_argument("-h", "--host", type=str, help="%s host name" % (testUtils.Utils.EosServerName),
parser.add_argument("-h", "--host", type=str, help="%s host name" % (testUtils.Utils.EnuServerName),
default=LOCAL_HOST)
parser.add_argument("-p", "--port", type=int, help="%s host port" % testUtils.Utils.EosServerName,
parser.add_argument("-p", "--port", type=int, help="%s host port" % testUtils.Utils.EnuServerName,
default=DEFAULT_PORT)
parser.add_argument("-c", "--prod-count", type=int, help="Per node producer count", default=1)
parser.add_argument("--defproducera_prvt_key", type=str, help="defproducera private key.")
Expand Down Expand Up @@ -71,7 +71,7 @@ def cmdError(name, cmdCode=0, exitNow=False):
cluster=testUtils.Cluster(walletd=True, enableMongo=enableMongo, defproduceraPrvtKey=defproduceraPrvtKey, defproducerbPrvtKey=defproducerbPrvtKey)
walletMgr=testUtils.WalletMgr(True)
testSuccessful=False
killEosInstances=not dontKill
killEnuInstances=not dontKill
killWallet=not dontKill

WalletdName="enuwallet"
Expand Down Expand Up @@ -99,7 +99,7 @@ def cmdError(name, cmdCode=0, exitNow=False):
errorExit("Failed to stand up eos cluster.")
else:
cluster.initializeNodes(defproduceraPrvtKey=defproduceraPrvtKey, defproducerbPrvtKey=defproducerbPrvtKey)
killEosInstances=False
killEnuInstances=False

accounts=testUtils.Cluster.createAccountKeys(3)
if accounts is None:
Expand Down Expand Up @@ -242,7 +242,7 @@ def cmdError(name, cmdCode=0, exitNow=False):

expectedAmount=transferAmount
Print("Verify transfer, Expected: %s" % (expectedAmount))
actualAmount=node.getAccountEosBalanceStr(testeraAccount.name)
actualAmount=node.getAccountEnuBalanceStr(testeraAccount.name)
if expectedAmount != actualAmount:
cmdError("FAILURE - transfer failed")
errorExit("Transfer verification failed. Excepted %s, actual: %s" % (expectedAmount, actualAmount))
Expand All @@ -257,7 +257,7 @@ def cmdError(name, cmdCode=0, exitNow=False):

expectedAmount="97.5421 EOS"
Print("Verify transfer, Expected: %s" % (expectedAmount))
actualAmount=node.getAccountEosBalanceStr(testeraAccount.name)
actualAmount=node.getAccountEnuBalanceStr(testeraAccount.name)
if expectedAmount != actualAmount:
cmdError("FAILURE - transfer failed")
errorExit("Transfer verification failed. Excepted %s, actual: %s" % (expectedAmount, actualAmount))
Expand Down Expand Up @@ -296,7 +296,7 @@ def cmdError(name, cmdCode=0, exitNow=False):

expectedAmount="98.0311 EOS" # 5000 initial deposit
Print("Verify transfer, Expected: %s" % (expectedAmount))
actualAmount=node.getAccountEosBalanceStr(currencyAccount.name)
actualAmount=node.getAccountEnuBalanceStr(currencyAccount.name)
if expectedAmount != actualAmount:
cmdError("FAILURE - transfer failed")
errorExit("Transfer verification failed. Excepted %s, actual: %s" % (expectedAmount, actualAmount))
Expand Down Expand Up @@ -428,7 +428,7 @@ def cmdError(name, cmdCode=0, exitNow=False):
errorExit("FAILURE - get code currency1111 failed", raw=True)
else:
Print("verify abi is set")
account=node.getEosAccountFromDb(currencyAccount.name)
account=node.getEnuAccountFromDb(currencyAccount.name)
abiName=account["abi"]["structs"][0]["name"]
abiActionName=account["abi"]["actions"][0]["name"]
abiType=account["abi"]["actions"][0]["type"]
Expand Down Expand Up @@ -567,7 +567,7 @@ def cmdError(name, cmdCode=0, exitNow=False):
errorExit("Failed to unlock wallet %s" % (defproduceraWallet.name))

Print("Get account defproducera")
account=node.getEosAccount(defproduceraAccount.name)
account=node.getEnuAccount(defproduceraAccount.name)
if account is None:
cmdError("%s get account" % (ClientName))
errorExit("Failed to get account %s" % (defproduceraAccount.name))
Expand Down Expand Up @@ -638,7 +638,7 @@ def cmdError(name, cmdCode=0, exitNow=False):
walletMgr.dumpErrorDetails()
Print("== Errors see above ==")

if killEosInstances:
if killEnuInstances:
Print("Shut down the cluster.")
cluster.killall()
if testSuccessful and not keepLogs:
Expand Down
2 changes: 1 addition & 1 deletion tests/p2p_network_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
Print("Info of each node:")
for i in range(len(hosts)):
node = cluster.getNode(0)
cmd="%s %s get info" % (testUtils.Utils.EosClientPath, node.endpointArgs)
cmd="%s %s get info" % (testUtils.Utils.EnuClientPath, node.endpointArgs)
trans = node.runCmdReturnJson(cmd)
Print("host %s: %s" % (hosts[i], trans))

Expand Down
12 changes: 6 additions & 6 deletions tests/restart-scenarios-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def errorExit(msg="", errorCode=1):
total_nodes = pnodes
killCount=args.kill_count if args.kill_count > 0 else 1
killSignal=args.kill_sig
killEosInstances= not args.dont_kill
killEnuInstances= not args.dont_kill
dumpErrorDetails=args.dump_error_details
keepLogs=args.keep_logs

Expand Down Expand Up @@ -124,8 +124,8 @@ def errorExit(msg="", errorCode=1):
errorExit("Cluster sync wait failed.")

Print("Kill %d cluster node instances." % (killCount))
if cluster.killSomeEosInstances(killCount, killSignal) is False:
errorExit("Failed to kill Eos instances")
if cluster.killSomeEnuInstances(killCount, killSignal) is False:
errorExit("Failed to kill Enu instances")
Print("enunode instances killed.")

# TBD: Known issue (Issue 2043) that 'get currency0000 balance' doesn't return balance.
Expand All @@ -139,8 +139,8 @@ def errorExit(msg="", errorCode=1):
errorExit("Cluster sync wait failed.")

Print ("Relaunch dead cluster nodes instances.")
if cluster.relaunchEosInstances() is False:
errorExit("Failed to relaunch Eos instances")
if cluster.relaunchEnuInstances() is False:
errorExit("Failed to relaunch Enu instances")
Print("enunode instances relaunched.")

Print ("Resyncing cluster nodes.")
Expand All @@ -165,7 +165,7 @@ def errorExit(msg="", errorCode=1):
walletMgr.dumpErrorDetails()
Print("== Errors see above ==")

if killEosInstances:
if killEnuInstances:
Print("Shut down the cluster%s" % (" and cleanup." if (testSuccessful and not keepLogs) else "."))
cluster.killall()
walletMgr.killall()
Expand Down
Loading

0 comments on commit d1fd6e8

Please sign in to comment.