From 24d213297855c71a2e9508a5196c00a61a582ee4 Mon Sep 17 00:00:00 2001 From: Leo Arias Date: Tue, 29 Aug 2017 22:21:02 -0600 Subject: [PATCH] Run integration tests in docker containers both locally and against a cluster --- integration_tests/.dockerignore | 6 + integration_tests/.gitignore | 4 +- .../bin/blockstack-test-scenario | 195 +++++++--- .../scenarios/issue469_1.py | 1 + ...transfer_update.py => name_imp_xfer_up.py} | 0 ...i_snv.py => name_imp_xfer_up_multi_snv.py} | 0 ..._update_snv.py => name_imp_xfer_up_snv.py} | 0 ...e_transfer.py => name_imp_xfer_up_xfer.py} | 0 ....py => name_imp_xfer_up_xfer_condensed.py} | 0 ...me_imp_xfer_up_xfer_condensed_multisig.py} | 0 ...xfer_up_xfer_condensed_multisig_delays.py} | 0 ...r_up_xfer_condensed_multisig_singlesig.py} | 0 ...e_preorder_register.py => name_pre_reg.py} | 0 ...r_announce.py => name_pre_reg_announce.py} | 0 ...cantsteal.py => name_pre_reg_cantsteal.py} | 0 ...llisions.py => name_pre_reg_collisions.py} | 0 ...ister_expire.py => name_pre_reg_expire.py} | 0 ...lure.py => name_pre_reg_expire_failure.py} | 0 ...sdead.py => name_pre_reg_expire_isdead.py} | 0 ...me_pre_reg_expire_nextepoch_reregister.py} | 0 ...r.py => name_pre_reg_expire_reregister.py} | 0 ...pire_snv.py => name_pre_reg_expire_snv.py} | 0 ...fast_sync.py => name_pre_reg_fast_sync.py} | 1 + ...multi_snv.py => name_pre_reg_multi_snv.py} | 0 ...r_multisig.py => name_pre_reg_multisig.py} | 0 ...me_pre_reg_nextepoch_expire_reregister.py} | 0 ...me_pre_reg_nextepoch_register_multisig.py} | 0 ...new.py => name_pre_reg_nextepoch_renew.py} | 0 ...ister_nodups.py => name_pre_reg_nodups.py} | 0 ...ister_portal.py => name_pre_reg_portal.py} | 0 ...al_auth.py => name_pre_reg_portal_auth.py} | 0 ...re.py => name_pre_reg_portal_datastore.py} | 0 ...egister_quota.py => name_pre_reg_quota.py} | 0 ...egister_renew.py => name_pre_reg_renew.py} | 0 ...rce.py => name_pre_reg_renew_cantforce.py} | 0 ...w_renew.py => name_pre_reg_renew_renew.py} | 0 ...renew_snv.py => name_pre_reg_renew_snv.py} | 0 ... => name_pre_reg_renew_transfer_update.py} | 0 ... => name_pre_reg_renew_update_transfer.py} | 0 ...py => name_pre_reg_reregister_newowner.py} | 0 ...y => name_pre_reg_reregister_sameowner.py} | 0 ...ister_revoke.py => name_pre_reg_revoke.py} | 0 ...ce.py => name_pre_reg_revoke_cantforce.py} | 0 ...sdead.py => name_pre_reg_revoke_isdead.py} | 0 ...r.py => name_pre_reg_revoke_reregister.py} | 0 ...ame_pre_reg_revoke_reregister_newowner.py} | 0 ...voke_snv.py => name_pre_reg_revoke_snv.py} | 0 ...er_register_snv.py => name_pre_reg_snv.py} | 0 ..._register_update.py => name_pre_reg_up.py} | 0 ...ccounts.py => name_pre_reg_up_accounts.py} | 0 ... => name_pre_reg_up_accounts_nodatakey.py} | 0 ...pp_auth.py => name_pre_reg_up_app_auth.py} | 0 ...re.py => name_pre_reg_up_app_datastore.py} | 0 ...pre_reg_up_app_datastore_blockchain_id.py} | 0 ..._pre_reg_up_app_datastore_multiservice.py} | 0 ...p_datastore_multiservice_failedservice.py} | 0 ...ame_pre_reg_up_app_datastore_multiuser.py} | 0 ...> name_pre_reg_up_app_datastore_rmtree.py} | 0 ...e_reg_up_app_datastore_stale_directory.py} | 0 ...me_pre_reg_up_app_datastore_stale_file.py} | 0 ...lish.py => name_pre_reg_up_app_publish.py} | 0 ...date_atlas.py => name_pre_reg_up_atlas.py} | 0 ...hain.py => name_pre_reg_up_atlas_chain.py} | 0 ...hurn.py => name_pre_reg_up_atlas_churn.py} | 0 ..._mesh.py => name_pre_reg_up_atlas_mesh.py} | 0 ...as_nat.py => name_pre_reg_up_atlas_nat.py} | 0 ...ge.py => name_pre_reg_up_atlas_storage.py} | 0 ...tforce.py => name_pre_reg_up_cantforce.py} | 0 ...y => name_pre_reg_up_datakey_migration.py} | 0 ....py => name_pre_reg_up_deleteimmutable.py} | 0 ...e_pre_reg_up_deleteimmutable_nodatakey.py} | 0 ...le.py => name_pre_reg_up_deletemutable.py} | 0 ...ame_pre_reg_up_deletemutable_nodatakey.py} | 0 ...y => name_pre_reg_up_expire_reregister.py} | 0 ...e_pre_reg_up_expire_reregister_failure.py} | 0 ...key.py => name_pre_reg_up_getpublickey.py} | 0 ..._history.py => name_pre_reg_up_history.py} | 0 ...et.py => name_pre_reg_up_import_wallet.py} | 0 ...name_pre_reg_up_import_wallet_multisig.py} | 0 ...y => name_pre_reg_up_legacy_013_wallet.py} | 0 ...y => name_pre_reg_up_legacy_014_wallet.py} | 0 ...et.py => name_pre_reg_up_legacy_wallet.py} | 0 ...tory.py => name_pre_reg_up_listhistory.py} | 0 ...> name_pre_reg_up_listimmutablehistory.py} | 0 ...e.py => name_pre_reg_up_migrateprofile.py} | 0 ...me_pre_reg_up_migrateprofile_nodatakey.py} | 0 ...re_reg_up_migrateprofile_nozonefilekey.py} | 0 ...=> name_pre_reg_up_multidevice_storage.py} | 0 ...> name_pre_reg_up_nonstandard_zonefile.py} | 0 ...otstale.py => name_pre_reg_up_notstale.py} | 0 ...ble.py => name_pre_reg_up_putimmutable.py} | 0 ...name_pre_reg_up_putimmutable_nodatakey.py} | 0 ...table.py => name_pre_reg_up_putmutable.py} | 0 ...> name_pre_reg_up_putmutable_nodatakey.py} | 0 ...me_pre_reg_up_putmutable_nozonefilekey.py} | 0 ...date_renew.py => name_pre_reg_up_renew.py} | 0 ...te_revoke.py => name_pre_reg_up_revoke.py} | 0 ...me_pre_reg_up_revoke_reregister_update.py} | 0 ...py => name_pre_reg_up_sign_verify_data.py} | 0 ...r_update_snv.py => name_pre_reg_up_snv.py} | 0 ....py => name_pre_reg_up_storage_gateway.py} | 0 ....py => name_pre_reg_up_update_transfer.py} | 0 ....py => name_pre_reg_up_upgrade_storage.py} | 0 ...age.py => name_pre_reg_up_user_storage.py} | 0 ...te_transfer.py => name_pre_reg_up_xfer.py} | 0 ...l.py => name_pre_reg_up_xfer_cantsteal.py} | 0 ...lays.py => name_pre_reg_up_xfer_delays.py} | 0 ...name_pre_reg_up_xfer_expire_reregister.py} | 0 ...e_reg_up_xfer_expire_reregister_delays.py} | 0 ..._reg_up_xfer_expire_reregister_failure.py} | 0 ..._up_xfer_nokeep_up_xfer_up_xfer_nokeep.py} | 0 ....py => name_pre_reg_up_xfer_nokeepdata.py} | 0 ...re_reg_up_xfer_renew_expire_reregister.py} | 0 ...p_xfer_renew_expire_reregister_failure.py} | 0 ...ame_pre_reg_up_xfer_renew_interleaving.py} | 0 ..._reg_up_xfer_renew_revoke_verify_multi.py} | 0 ...fer_renew_revoke_verify_multi_multisig.py} | 0 ...me_pre_reg_up_xfer_revoke_verify_multi.py} | 0 ...reg_up_xfer_up_xfer_nokeepdata_up_xfer.py} | 0 ...utxos.py => name_pre_reg_up_xfer_utxos.py} | 0 ...rify.py => name_pre_reg_up_xfer_verify.py} | 0 ...ister_transfer.py => name_pre_reg_xfer.py} | 0 ...orce.py => name_pre_reg_xfer_cantforce.py} | 0 ...ata.py => name_pre_reg_xfer_nokeepdata.py} | 0 ...=> name_pre_reg_xfer_nokeepdata_update.py} | 0 ...e_reg_xfer_nokeepdata_update_cantforce.py} | 0 ...er_renew.py => name_pre_reg_xfer_renew.py} | 0 ...e.py => name_pre_reg_xfer_renew_update.py} | 0 ..._revoke.py => name_pre_reg_xfer_revoke.py} | 0 ...ansfer_snv.py => name_pre_reg_xfer_snv.py} | 0 ...nsfer.py => name_pre_reg_xfer_transfer.py} | 0 ...r_transfer_nextepoch_transfer_multisig.py} | 0 ...y => name_pre_reg_xfer_transfer_update.py} | 0 ...eg_xfer_up_expire_rereg_delays_failure.py} | 0 ..._up_xfer_condensed_multi_single_delays.py} | 0 ...r_up_xfer_condensed_multisig_singlesig.py} | 0 ..._update.py => name_pre_reg_xfer_update.py} | 0 ....py => name_pre_reg_xfer_update_delays.py} | 0 ...g_xfer_update_expire_reregister_delays.py} | 0 ...y => name_pre_reg_xfer_update_transfer.py} | 0 ...pre_reg_xfer_update_transfer_condensed.py} | 0 ...fer_update_transfer_condensed_multisig.py} | 0 ...r_update_transfer_condensed_nokeepdata.py} | 0 ...e_pre_reveal_imp_expire_pre_reveal_imp.py} | 0 .../tests_skip.txt | 17 +- .../deployment/docker/Dockerfile.dev | 16 + .../deployment/docker/Dockerfile.tests | 47 +++ integration_tests/setup.py | 3 +- integration_tests/terminal-out.tmpl | 14 + integration_tests/test-launcher | 361 ++++++++++++++++++ 150 files changed, 595 insertions(+), 70 deletions(-) create mode 100644 integration_tests/.dockerignore rename integration_tests/blockstack_integration_tests/scenarios/{name_import_transfer_update.py => name_imp_xfer_up.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_import_transfer_update_multi_snv.py => name_imp_xfer_up_multi_snv.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_import_transfer_update_snv.py => name_imp_xfer_up_snv.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_import_transfer_update_transfer.py => name_imp_xfer_up_xfer.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_import_transfer_update_transfer_condensed.py => name_imp_xfer_up_xfer_condensed.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_import_transfer_update_transfer_condensed_multisig.py => name_imp_xfer_up_xfer_condensed_multisig.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_import_transfer_update_transfer_condensed_multisig_delays.py => name_imp_xfer_up_xfer_condensed_multisig_delays.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_import_transfer_update_transfer_condensed_multisig_singlesig.py => name_imp_xfer_up_xfer_condensed_multisig_singlesig.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register.py => name_pre_reg.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_announce.py => name_pre_reg_announce.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_cantsteal.py => name_pre_reg_cantsteal.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_collisions.py => name_pre_reg_collisions.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_expire.py => name_pre_reg_expire.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_expire_failure.py => name_pre_reg_expire_failure.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_expire_isdead.py => name_pre_reg_expire_isdead.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_expire_nextepoch_reregister.py => name_pre_reg_expire_nextepoch_reregister.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_expire_reregister.py => name_pre_reg_expire_reregister.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_expire_snv.py => name_pre_reg_expire_snv.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_fast_sync.py => name_pre_reg_fast_sync.py} (99%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_multi_snv.py => name_pre_reg_multi_snv.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_multisig.py => name_pre_reg_multisig.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_nextepoch_expire_reregister.py => name_pre_reg_nextepoch_expire_reregister.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_nextepoch_register_multisig.py => name_pre_reg_nextepoch_register_multisig.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_nextepoch_renew.py => name_pre_reg_nextepoch_renew.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_nodups.py => name_pre_reg_nodups.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_portal.py => name_pre_reg_portal.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_portal_auth.py => name_pre_reg_portal_auth.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_portal_datastore.py => name_pre_reg_portal_datastore.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_quota.py => name_pre_reg_quota.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_renew.py => name_pre_reg_renew.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_renew_cantforce.py => name_pre_reg_renew_cantforce.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_renew_renew.py => name_pre_reg_renew_renew.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_renew_snv.py => name_pre_reg_renew_snv.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_renew_transfer_update.py => name_pre_reg_renew_transfer_update.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_renew_update_transfer.py => name_pre_reg_renew_update_transfer.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_reregister_newowner.py => name_pre_reg_reregister_newowner.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_reregister_sameowner.py => name_pre_reg_reregister_sameowner.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_revoke.py => name_pre_reg_revoke.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_revoke_cantforce.py => name_pre_reg_revoke_cantforce.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_revoke_isdead.py => name_pre_reg_revoke_isdead.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_revoke_reregister.py => name_pre_reg_revoke_reregister.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_revoke_reregister_newowner.py => name_pre_reg_revoke_reregister_newowner.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_revoke_snv.py => name_pre_reg_revoke_snv.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_snv.py => name_pre_reg_snv.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update.py => name_pre_reg_up.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_accounts.py => name_pre_reg_up_accounts.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_accounts_nodatakey.py => name_pre_reg_up_accounts_nodatakey.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_app_auth.py => name_pre_reg_up_app_auth.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_app_datastore.py => name_pre_reg_up_app_datastore.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_app_datastore_blockchain_id.py => name_pre_reg_up_app_datastore_blockchain_id.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_app_datastore_multiservice.py => name_pre_reg_up_app_datastore_multiservice.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_app_datastore_multiservice_failedservice.py => name_pre_reg_up_app_datastore_multiservice_failedservice.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_app_datastore_multiuser.py => name_pre_reg_up_app_datastore_multiuser.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_app_datastore_rmtree.py => name_pre_reg_up_app_datastore_rmtree.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_app_datastore_stale_directory.py => name_pre_reg_up_app_datastore_stale_directory.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_app_datastore_stale_file.py => name_pre_reg_up_app_datastore_stale_file.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_app_publish.py => name_pre_reg_up_app_publish.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_atlas.py => name_pre_reg_up_atlas.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_atlas_chain.py => name_pre_reg_up_atlas_chain.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_atlas_churn.py => name_pre_reg_up_atlas_churn.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_atlas_mesh.py => name_pre_reg_up_atlas_mesh.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_atlas_nat.py => name_pre_reg_up_atlas_nat.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_atlas_storage.py => name_pre_reg_up_atlas_storage.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_cantforce.py => name_pre_reg_up_cantforce.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_datakey_migration.py => name_pre_reg_up_datakey_migration.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_deleteimmutable.py => name_pre_reg_up_deleteimmutable.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_deleteimmutable_nodatakey.py => name_pre_reg_up_deleteimmutable_nodatakey.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_deletemutable.py => name_pre_reg_up_deletemutable.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_deletemutable_nodatakey.py => name_pre_reg_up_deletemutable_nodatakey.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_expire_reregister.py => name_pre_reg_up_expire_reregister.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_expire_reregister_failure.py => name_pre_reg_up_expire_reregister_failure.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_getpublickey.py => name_pre_reg_up_getpublickey.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_history.py => name_pre_reg_up_history.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_import_wallet.py => name_pre_reg_up_import_wallet.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_import_wallet_multisig.py => name_pre_reg_up_import_wallet_multisig.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_legacy_013_wallet.py => name_pre_reg_up_legacy_013_wallet.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_legacy_014_wallet.py => name_pre_reg_up_legacy_014_wallet.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_legacy_wallet.py => name_pre_reg_up_legacy_wallet.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_listhistory.py => name_pre_reg_up_listhistory.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_listimmutablehistory.py => name_pre_reg_up_listimmutablehistory.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_migrateprofile.py => name_pre_reg_up_migrateprofile.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_migrateprofile_nodatakey.py => name_pre_reg_up_migrateprofile_nodatakey.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_migrateprofile_nozonefilekey.py => name_pre_reg_up_migrateprofile_nozonefilekey.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_multidevice_storage.py => name_pre_reg_up_multidevice_storage.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_nonstandard_zonefile.py => name_pre_reg_up_nonstandard_zonefile.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_notstale.py => name_pre_reg_up_notstale.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_putimmutable.py => name_pre_reg_up_putimmutable.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_putimmutable_nodatakey.py => name_pre_reg_up_putimmutable_nodatakey.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_putmutable.py => name_pre_reg_up_putmutable.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_putmutable_nodatakey.py => name_pre_reg_up_putmutable_nodatakey.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_putmutable_nozonefilekey.py => name_pre_reg_up_putmutable_nozonefilekey.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_renew.py => name_pre_reg_up_renew.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_revoke.py => name_pre_reg_up_revoke.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_revoke_reregister_update.py => name_pre_reg_up_revoke_reregister_update.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_sign_verify_data.py => name_pre_reg_up_sign_verify_data.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_snv.py => name_pre_reg_up_snv.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_storage_gateway.py => name_pre_reg_up_storage_gateway.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_update_transfer.py => name_pre_reg_up_update_transfer.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_upgrade_storage.py => name_pre_reg_up_upgrade_storage.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_user_storage.py => name_pre_reg_up_user_storage.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer.py => name_pre_reg_up_xfer.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_cantsteal.py => name_pre_reg_up_xfer_cantsteal.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_delays.py => name_pre_reg_up_xfer_delays.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_expire_reregister.py => name_pre_reg_up_xfer_expire_reregister.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_expire_reregister_delays.py => name_pre_reg_up_xfer_expire_reregister_delays.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_expire_reregister_failure.py => name_pre_reg_up_xfer_expire_reregister_failure.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_nokeepdata_update_transfer_update_transfer_nokeepdata.py => name_pre_reg_up_xfer_nokeep_up_xfer_up_xfer_nokeep.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_nokeepdata.py => name_pre_reg_up_xfer_nokeepdata.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_renew_expire_reregister.py => name_pre_reg_up_xfer_renew_expire_reregister.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_renew_expire_reregister_failure.py => name_pre_reg_up_xfer_renew_expire_reregister_failure.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_renew_interleaving.py => name_pre_reg_up_xfer_renew_interleaving.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_renew_revoke_verify_multi.py => name_pre_reg_up_xfer_renew_revoke_verify_multi.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_renew_revoke_verify_multi_multisig.py => name_pre_reg_up_xfer_renew_revoke_verify_multi_multisig.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_revoke_verify_multi.py => name_pre_reg_up_xfer_revoke_verify_multi.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_update_transfer_nokeepdata_update_transfer.py => name_pre_reg_up_xfer_up_xfer_nokeepdata_up_xfer.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_utxos.py => name_pre_reg_up_xfer_utxos.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_update_transfer_verify.py => name_pre_reg_up_xfer_verify.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer.py => name_pre_reg_xfer.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_cantforce.py => name_pre_reg_xfer_cantforce.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_nokeepdata.py => name_pre_reg_xfer_nokeepdata.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_nokeepdata_update.py => name_pre_reg_xfer_nokeepdata_update.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_nokeepdata_update_cantforce.py => name_pre_reg_xfer_nokeepdata_update_cantforce.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_renew.py => name_pre_reg_xfer_renew.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_renew_update.py => name_pre_reg_xfer_renew_update.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_revoke.py => name_pre_reg_xfer_revoke.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_snv.py => name_pre_reg_xfer_snv.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_transfer.py => name_pre_reg_xfer_transfer.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_transfer_nextepoch_transfer_multisig.py => name_pre_reg_xfer_transfer_nextepoch_transfer_multisig.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_transfer_update.py => name_pre_reg_xfer_transfer_update.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_update_expire_reregister_delays_failure.py => name_pre_reg_xfer_up_expire_rereg_delays_failure.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_update_transfer_condensed_multisig_singlesig_delays.py => name_pre_reg_xfer_up_xfer_condensed_multi_single_delays.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_update_transfer_condensed_multisig_singlesig.py => name_pre_reg_xfer_up_xfer_condensed_multisig_singlesig.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_update.py => name_pre_reg_xfer_update.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_update_delays.py => name_pre_reg_xfer_update_delays.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_update_expire_reregister_delays.py => name_pre_reg_xfer_update_expire_reregister_delays.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_update_transfer.py => name_pre_reg_xfer_update_transfer.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_update_transfer_condensed.py => name_pre_reg_xfer_update_transfer_condensed.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_update_transfer_condensed_multisig.py => name_pre_reg_xfer_update_transfer_condensed_multisig.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{name_preorder_register_transfer_update_transfer_condensed_nokeepdata.py => name_pre_reg_xfer_update_transfer_condensed_nokeepdata.py} (100%) rename integration_tests/blockstack_integration_tests/scenarios/{namespace_preorder_reveal_import_expire_preorder_reveal_import.py => namespace_pre_reveal_imp_expire_pre_reveal_imp.py} (100%) create mode 100644 integration_tests/deployment/docker/Dockerfile.dev create mode 100644 integration_tests/deployment/docker/Dockerfile.tests create mode 100644 integration_tests/terminal-out.tmpl create mode 100755 integration_tests/test-launcher diff --git a/integration_tests/.dockerignore b/integration_tests/.dockerignore new file mode 100644 index 000000000..8f560bbba --- /dev/null +++ b/integration_tests/.dockerignore @@ -0,0 +1,6 @@ +test-out/ +tmp/ +deployment/ +test-launcher +portal_test.sh +get_started.sh diff --git a/integration_tests/.gitignore b/integration_tests/.gitignore index b3065f338..493509051 100644 --- a/integration_tests/.gitignore +++ b/integration_tests/.gitignore @@ -14,6 +14,7 @@ develop-eggs/ dist/ downloads/ eggs/ +tmp/ .eggs/ lib/ lib64/ @@ -23,6 +24,7 @@ var/ *.egg-info/ .installed.cfg *.egg +test-out/ # PyInstaller # Usually these files are written by a python script from a template @@ -58,7 +60,7 @@ target/ #Ipython Notebook .ipynb_checkpoints -# no vim +# no vim *.swp *.swo *.swn diff --git a/integration_tests/bin/blockstack-test-scenario b/integration_tests/bin/blockstack-test-scenario index 4b7651d22..0134d6b44 100755 --- a/integration_tests/bin/blockstack-test-scenario +++ b/integration_tests/bin/blockstack-test-scenario @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python import os @@ -12,7 +12,7 @@ os.environ['BLOCKSTACK_ATLAS_NETWORK_SIMULATION'] = '1' TEST_FIRST_BLOCK_HEIGHT = 250 # how many blocks we have to generate to start regtest os.environ['BLOCKSTACK_TEST_FIRST_BLOCK'] = str(TEST_FIRST_BLOCK_HEIGHT + 6) -import sys +import sys import subprocess import signal import shutil @@ -27,6 +27,8 @@ import threading import argparse import BaseHTTPServer import cgi +from datetime import datetime +from influxdb import InfluxDBClient blockstack = None blockstackd = None @@ -35,7 +37,7 @@ g_interactive = False import pybitcoin -import virtualchain +import virtualchain log = virtualchain.get_logger("blockstack-test-scenario") from virtualchain.lib.blockchain.bitcoin_blockchain import JSONRPCException @@ -79,7 +81,7 @@ zonefile_storage_drivers = disk profile_storage_drivers = disk data_storage_drivers = disk atlas = True -atlas_seeds = +atlas_seeds = atlas_blacklist = atlas_hostname = localhost """ % TEST_RPC_PORT @@ -182,7 +184,7 @@ class WebTestServerRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): panel += '
' panel += '
' panel += '' - + self.send_response(200) self.send_header('content-type', 'text/html') self.send_header('content-length', len(panel)) @@ -211,7 +213,7 @@ class WebTestServerRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): log.error("postvars = {}".format(postvars)) self.send_response(401, "Invalid number of blocks") self.end_headers() - return + return for i in xrange(0, numblocks): self.server.next_block() @@ -230,7 +232,7 @@ class WebTestServerRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): log.error("Missing addr or value") self.send_response(401, "Invalid request: missing addr or value") self.end_headers() - return + return try: value = int(value[0]) @@ -316,17 +318,17 @@ def load_scenario( scenario_name ): A scenario is a python file with: * a global variable 'wallet' that is a dict which maps private keys to their initial values. - * a global variable 'consensus' that represents + * a global variable 'consensus' that represents the initial consensus hash. - * a callable called 'scenario' that takes the + * a callable called 'scenario' that takes the wallet as an argument and runs the test. - * a callable called 'check' that takes the state + * a callable called 'check' that takes the state engine as an argument and checks it for correctness. """ log.debug("Load scenario %s" % scenario_name) - # strip .py from scenario name + # strip .py from scenario name if scenario_name.endswith(".py"): scenario_name = scenario_name[:-3] @@ -334,7 +336,7 @@ def load_scenario( scenario_name ): log.debug("Identifying scenario path") p = subprocess.Popen( "python -c 'import %s; print %s.__file__'" % (scenario_name, scenario_name), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) path_buf, err = p.communicate() - + if p.returncode is not None and p.returncode != 0: print >> sys.stderr, err raise Exception("Failed to load %s, exit code %s" % (scenario_name, p.returncode)) @@ -348,7 +350,7 @@ def load_scenario( scenario_name ): # load any test pragmas (like environment variables) and set them now with open(path, "r") as f: scenario_data = f.readlines() - + for line in scenario_data: line = line.strip() try: @@ -366,29 +368,29 @@ def load_scenario( scenario_name ): log.exception(ie) raise Exception("Failed to import '%s'." % scenario_name ) - # validate + # validate if not hasattr( scenario, "wallets" ): - # default empty wallet + # default empty wallet log.warning("Empty wallet for scenario '%s'" % scenario_name ) scenario.wallets = {} if not hasattr( scenario, "consensus" ): - # default consensus hash + # default consensus hash log.warning("No consensus hash for '%s'" % scenario_name ) scenario.consensus = "00" * 16 if not hasattr( scenario, "scenario" ): - # not a valid test + # not a valid test log.error("Invalid scenario '%s': no 'scenario' method" % scenario_name ) - return None + return None if not hasattr( scenario, "check" ): - # not a valid test + # not a valid test log.error("Invalid scenario '%s': no 'check' method" % scenario_name ) - return None + return None return scenario - + def generate_config_file( scenario, path, template, extra_fields): """ @@ -421,7 +423,7 @@ def generate_config_file( scenario, path, template, extra_fields): spv_headers_path = os.path.join( os.environ.get("VIRTUALCHAIN_WORKING_DIR", None), "spv_headers.dat") config_txt = config_txt.replace( "@CLIENT_BLOCKCHAIN_HEADERS@", spv_headers_path ) - config_txt = config_txt.replace( "@CLIENT_METADATA@", client_metadata ) + config_txt = config_txt.replace( "@CLIENT_METADATA@", client_metadata ) config_txt = config_txt.replace( "@CLIENT_ACCOUNTS_PATH@", accounts_dir ) config_txt = config_txt.replace( "@CLIENT_USERS_PATH@", users_dir ) config_txt = config_txt.replace( "@CLIENT_DATASTORES_PATH@", datastores_path ) @@ -456,7 +458,7 @@ def network_start( blockstack_opts, db ): blockstackd.rpc_start(TEST_RPC_PORT) return atlas_state - + def storage_start( blockstack_opts ): """ @@ -553,7 +555,7 @@ def sync_virtualchain_upcall( blockstack_opts, need_db_refresh=False ): rpcclient.db_refresh() log.debug("sync atlas node up to %s" % (height)) - + # synchronize atlas db if blockstack_opts.get('atlas', False) and hasattr(blockstackd, "atlasdb_sync_zonefiles"): if old_lastblock < db.lastblock: @@ -566,8 +568,8 @@ def run_scenario( scenario, config_file, client_config_file, interactive=False, """ Run a test scenario: * set up the virtualchain to use our mock UTXO provider and mock bitcoin blockchain - * seed it with the initial values in the wallet - * set the initial consensus hash + * seed it with the initial values in the wallet + * set the initial consensus hash * start the API server * run the scenario method * run the check method @@ -617,7 +619,7 @@ def run_scenario( scenario, config_file, client_config_file, interactive=False, print "" print "atlas node initialization" print "" - + db = blockstackd.get_db_state(disposition=blockstackd.DISPOSITION_RW) if hasattr(blockstackd, "atlasdb_init"): @@ -650,14 +652,14 @@ def run_scenario( scenario, config_file, client_config_file, interactive=False, # start taking RPC requests atlas_state = network_start( blockstack_opts, db ) - # start storage + # start storage storage_start( blockstack_opts ) # start pinging bitcoind so it pushes out p2p messages pinger = Pinger() pinger.start() - # shutdown procedure + # shutdown procedure def shutdown_procedure(*args, **kw): log.info("Shutting down network") network_stop() @@ -673,7 +675,7 @@ def run_scenario( scenario, config_file, client_config_file, interactive=False, log.info("Shutting down API endpoint") blockstack_client.rpc.local_api_stop(client_config_dir) - + if pinger: log.info("Shutting down pinger") pinger.ask_join() @@ -715,7 +717,7 @@ def run_scenario( scenario, config_file, client_config_file, interactive=False, "blockstack_opts": blockstack_opts } - # sync initial utxos + # sync initial utxos testlib.next_block( **test_env ) # load the scenario into the mock blockchain and mock utxo provider @@ -750,8 +752,8 @@ def run_scenario( scenario, config_file, client_config_file, interactive=False, blockstack_client.rpc.local_api_stop(client_config_dir) log.error("Failed to run tests '%s'" % scenario.__name__) shutdown_procedure() - return False - + return False + if not rc: shutdown_procedure() return rc @@ -790,13 +792,13 @@ def run_scenario( scenario, config_file, client_config_file, interactive=False, webtest_server = WebTestServer(webtest_port, test_env) while not webtest_server.done: webtest_server.handle_request() - + pinger.ask_join() pinger.join() pinger = None - # stop atlas support + # stop atlas support atlas_stop( atlas_state ) if interactive: shutdown_procedure() @@ -804,7 +806,7 @@ def run_scenario( scenario, config_file, client_config_file, interactive=False, log.info("\n\nScenario checks passed; verifying history\n\n") - # run database integrity check at each block + # run database integrity check at each block db = blockstackd.get_db_state(disposition=blockstackd.DISPOSITION_RO) rc = False try: @@ -817,11 +819,11 @@ def run_scenario( scenario, config_file, client_config_file, interactive=False, log.info("History check passes!") - if need_db_refresh: + if need_db_refresh: rpcclient = testlib.TestAPIProxy() rpcclient.db_refresh() - # run snv at each name + # run snv at each name db = blockstackd.get_db_state(disposition=blockstackd.DISPOSITION_RO) rc = False try: @@ -836,7 +838,7 @@ def run_scenario( scenario, config_file, client_config_file, interactive=False, # verify atlas zonefiles db = blockstackd.get_db_state(disposition=blockstackd.DISPOSITION_RO) - + if atlas_state is not None: rc = testlib.check_atlas_zonefiles( db, blockstack_opts['atlasdb_path'] ) if not rc: @@ -896,7 +898,7 @@ def bitcoin_regtest_reset(): f.flush() os.fsync(f.fileno()) - # start up + # start up log.debug("Starting up bitcoind in regtest mode") rc = os.system("bitcoind -daemon -conf=%s" % (bitcoin_conf)) if rc != 0: @@ -999,11 +1001,11 @@ def bitcoin_regtest_fill_wallets( wallets, default_payment_wallet=None ): for wallet in wallets: # fill each wallet fill_wallet( bitcoind, wallet, 50 ) - + if default_payment_wallet is not None: # fill optional default payment address fill_wallet( bitcoind, default_payment_wallet, 250 ) - + bitcoind.generate(6) print >> sys.stderr, "" @@ -1051,7 +1053,7 @@ class BitcoinRegtestUTXOProvider(object): def __init__(self, bitcoind): self.bitcoind = bitcoind - + def get_unspents( self, address, blockchain_client=None ): """ @@ -1106,6 +1108,7 @@ def parse_args( argv ): parser.add_argument("--interactive-web", dest='webtest_port', type=int, help='Run interactively, but generate blocks only when programmatically instructedr', required=False) parser.add_argument("--working-dir", dest='working_dir', type=str, help="Working directory to use to store database state", required=False) + parser.add_argument("--influx", dest='influx', action='store_true', help="Write test output to monitoring in additon to stdout", required=False) parser.add_argument("scenario_module", type=str, help="Python module to run") args, _ = parser.parse_known_args() @@ -1114,8 +1117,11 @@ def parse_args( argv ): if __name__ == "__main__": + test_start = datetime.utcnow() + test_end = None + if len(sys.argv) < 2: - print >> sys.stderr, "Usage: %s [--interactive [blocktime]] [--interactive-web port] [scenario.import.path] [OPTIONAL: working dir]" + print >> sys.stderr, "Usage: %s [--interactive [blocktime]] [--interactive-web port] [--influx] [scenario.import.path] [OPTIONAL: working dir]" sys.exit(1) args = parse_args(sys.argv) @@ -1125,6 +1131,21 @@ if __name__ == "__main__": webtest_port = None working_dir = None scenario_module = args.scenario_module + influx_client = None + + if hasattr(args, "influx") and args.influx is not False: + # TODO: pull config from ENV + # host = os.environ["INFLUX_HOST"] + influx_host = os.environ["INFLUX_HOST"] + influx_user = os.environ["INFLUX_USER"] + influx_pass = os.environ["INFLUX_PASS"] + influx_ssl = os.environ["INFLUX_SSL"] + + if influx_ssl == "True": + influx_ssl = True + + influx_client = InfluxDBClient(host=influx_host, port=8086, username=influx_user, password=influx_pass, ssl=influx_ssl, database='testing') + influx_client.create_database("testing") if hasattr(args, "blocktime") and args.blocktime is not None: interactive = True @@ -1140,7 +1161,7 @@ if __name__ == "__main__": if hasattr(args, "working_dir") and args.working_dir is not None: working_dir = args.working_dir - + else: working_dir = "/tmp/blockstack-run-scenario.%s" % scenario_module @@ -1150,34 +1171,34 @@ if __name__ == "__main__": shutil.rmtree(working_dir) if not os.path.exists(working_dir): - os.makedirs(working_dir) + os.makedirs(working_dir) client_working_dir = os.path.join(working_dir, "client") client_metadata = os.path.join(client_working_dir, "metadata") client_accounts_path = os.path.join(client_working_dir, "app_accounts") client_users_path = os.path.join(client_working_dir, "users") client_queue_path = os.path.join( client_working_dir, "queues.db" ) - config_file = os.path.join( working_dir, "blockstack-server.ini" ) + config_file = os.path.join( working_dir, "blockstack-server.ini" ) client_config_file = os.path.join( client_working_dir, "client.ini" ) client_datastores_path = os.path.join( client_working_dir, "datastores" ) os.makedirs(client_working_dir) - os.makedirs(client_metadata) + os.makedirs(client_metadata) os.makedirs(client_accounts_path) os.makedirs(client_datastores_path) - # export to test + # export to test os.environ["BLOCKSTACK_CLIENT_CONFIG"] = client_config_file os.environ["BLOCKSTACK_SERVER_CONFIG"] = config_file os.environ['VIRTUALCHAIN_WORKING_DIR'] = working_dir - # load up the scenario (so it can set its own extra envars) + # load up the scenario (so it can set its own extra envars) scenario = load_scenario( scenario_module ) if scenario is None: print "Failed to load '%s'" % scenario_module sys.exit(1) - # *now* we can import blockstack + # *now* we can import blockstack import blockstack import blockstack.blockstackd as blockstackd from blockstack.lib import * @@ -1186,24 +1207,24 @@ if __name__ == "__main__": import blockstack_integration_tests.scenarios.testlib as testlib - # set up bitcoind + # set up bitcoind bitcoin_regtest_reset() - # set up disk storage + # set up disk storage if os.path.exists("/tmp/blockstack-disk"): shutil.rmtree("/tmp/blockstack-disk") - + if os.path.exists("/tmp/blockstack-integration-test-storage"): shutil.rmtree("/tmp/blockstack-integration-test-storage") - # set up SPV + # set up SPV if os.path.exists("/tmp/blockstack-test-scenario-spv.dat"): os.unlink("/tmp/blockstack-test-scenario-spv.dat") - # set up default payment wallet - default_payment_wallet = testlib.MultisigWallet( 2, '5JYAj69z2GuFAZHrkhRuBKoCmKh6GcPXgcw9pbH8e8J2pu2RU9z', '5Kfg4xkZ1gGN5ozgDZ37Mn3EH9pXSuWZnQt1pzax4cLax8PetNs', '5JXB7rNxZa8yQtpuKtwy1nWUUTgdDEYTDmaEqQvKKC8HCWs64bL' ) + # set up default payment wallet + default_payment_wallet = testlib.MultisigWallet( 2, '5JYAj69z2GuFAZHrkhRuBKoCmKh6GcPXgcw9pbH8e8J2pu2RU9z', '5Kfg4xkZ1gGN5ozgDZ37Mn3EH9pXSuWZnQt1pzax4cLax8PetNs', '5JXB7rNxZa8yQtpuKtwy1nWUUTgdDEYTDmaEqQvKKC8HCWs64bL' ) - # load wallets + # load wallets bitcoin_regtest_fill_wallets( scenario.wallets, default_payment_wallet=default_payment_wallet ) testlib.set_default_payment_wallet( default_payment_wallet ) testlib.set_wallets( scenario.wallets ) @@ -1246,20 +1267,70 @@ if __name__ == "__main__": "REDIRECT_DATA": redirect_data, \ "DATA_SERVERS": data_servers }) + if rc != 0: log.error("failed to write config file: exit %s" % rc) sys.exit(1) - # run the test + + # run the test rc = run_scenario( scenario, config_file, client_config_file, interactive=interactive, blocktime=blocktime, webtest_port=webtest_port ) - + if rc: + # time the test + + # retrieve git information from the environment + print "SUCCESS %s" % scenario.__name__ # shutil.rmtree( working_dir ) + if args.influx: + test_time = datetime.utcnow() - test_start + git_commit = os.environ["GIT_COMMIT"] + git_branch = os.environ["GIT_BRANCH"] + num_tests = os.environ["NUM_TESTS"] + point = [ + { + "measurement": "integration_tests", + "tags": { + "git_branch": git_branch, + "git_commit": git_commit, + "success": True, + "test_scenario": scenario_module.split(".")[2] + }, + "time": datetime.utcnow().isoformat(), + "fields": { + "runtime": test_time.microseconds, + "num_tests": num_tests + } + } + ] + influx_client.write_points(point) + sys.exit(0) else: + if args.influx: + test_time = datetime.utcnow() - test_start + git_commit = os.environ["GIT_COMMIT"] + git_branch = os.environ["GIT_BRANCH"] + num_tests = os.environ["NUM_TESTS"] + point = [ + { + "measurement": "integration_tests", + "tags": { + "git_branch": git_branch, + "git_commit": git_commit, + "success": True, + "test_scenario": scenario_module.split(".")[2] + }, + "time": datetime.datetime.utcnow().isoformat(), + "fields": { + "runtime": test_time.microseconds, + "num_tests": num_tests + } + } + ] + influx_client.write_points(point) + print >> sys.stderr, "FAILURE %s" % scenario.__name__ print >> sys.stderr, "Test output in %s" % working_dir os.abort() - - diff --git a/integration_tests/blockstack_integration_tests/scenarios/issue469_1.py b/integration_tests/blockstack_integration_tests/scenarios/issue469_1.py index f1106674c..2d535d7b4 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/issue469_1.py +++ b/integration_tests/blockstack_integration_tests/scenarios/issue469_1.py @@ -72,6 +72,7 @@ def scenario( wallets, **kw ): resp = testlib.blockstack_cli_register( "foo.test", "0123456789abcdef" ) if 'error' in resp: + import sys print >> sys.stderr, json.dumps(resp, indent=4, sort_keys=True) return False diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update.py b/integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update.py rename to integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_multi_snv.py b/integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_multi_snv.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_multi_snv.py rename to integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_multi_snv.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_snv.py b/integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_snv.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_snv.py rename to integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_snv.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_transfer.py b/integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_xfer.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_transfer.py rename to integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_xfer.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_transfer_condensed.py b/integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_xfer_condensed.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_transfer_condensed.py rename to integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_xfer_condensed.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_transfer_condensed_multisig.py b/integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_xfer_condensed_multisig.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_transfer_condensed_multisig.py rename to integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_xfer_condensed_multisig.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_transfer_condensed_multisig_delays.py b/integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_xfer_condensed_multisig_delays.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_transfer_condensed_multisig_delays.py rename to integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_xfer_condensed_multisig_delays.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_transfer_condensed_multisig_singlesig.py b/integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_xfer_condensed_multisig_singlesig.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_import_transfer_update_transfer_condensed_multisig_singlesig.py rename to integration_tests/blockstack_integration_tests/scenarios/name_imp_xfer_up_xfer_condensed_multisig_singlesig.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_announce.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_announce.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_announce.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_announce.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_cantsteal.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_cantsteal.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_cantsteal.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_cantsteal.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_collisions.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_collisions.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_collisions.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_collisions.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire_failure.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire_failure.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire_failure.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire_failure.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire_isdead.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire_isdead.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire_isdead.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire_isdead.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire_nextepoch_reregister.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire_nextepoch_reregister.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire_nextepoch_reregister.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire_nextepoch_reregister.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire_reregister.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire_reregister.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire_reregister.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire_reregister.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire_snv.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire_snv.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_expire_snv.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_expire_snv.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_fast_sync.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_fast_sync.py similarity index 99% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_fast_sync.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_fast_sync.py index 3575598e3..204b3c2fc 100644 --- a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_fast_sync.py +++ b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_fast_sync.py @@ -29,6 +29,7 @@ import blockstack import blockstack_client import blockstack_zones import virtualchain +import json wallets = [ testlib.Wallet( "5JesPiN68qt44Hc2nT8qmyZ1JDwHebfoh9KQ52Lazb1m1LaKNj9", 100000000000 ), diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_multi_snv.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_multi_snv.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_multi_snv.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_multi_snv.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_multisig.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_multisig.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_multisig.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_multisig.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nextepoch_expire_reregister.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_nextepoch_expire_reregister.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nextepoch_expire_reregister.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_nextepoch_expire_reregister.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nextepoch_register_multisig.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_nextepoch_register_multisig.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nextepoch_register_multisig.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_nextepoch_register_multisig.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nextepoch_renew.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_nextepoch_renew.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nextepoch_renew.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_nextepoch_renew.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nodups.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_nodups.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_nodups.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_nodups.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_portal.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_portal.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_portal.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_portal.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_portal_auth.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_portal_auth.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_portal_auth.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_portal_auth.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_portal_datastore.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_portal_datastore.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_portal_datastore.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_portal_datastore.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_quota.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_quota.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_quota.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_quota.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew_cantforce.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew_cantforce.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew_cantforce.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew_cantforce.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew_renew.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew_renew.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew_renew.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew_renew.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew_snv.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew_snv.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew_snv.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew_snv.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew_transfer_update.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew_transfer_update.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew_transfer_update.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew_transfer_update.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew_update_transfer.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew_update_transfer.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_renew_update_transfer.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_renew_update_transfer.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_reregister_newowner.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_reregister_newowner.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_reregister_newowner.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_reregister_newowner.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_reregister_sameowner.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_reregister_sameowner.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_reregister_sameowner.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_reregister_sameowner.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_cantforce.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke_cantforce.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_cantforce.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke_cantforce.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_isdead.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke_isdead.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_isdead.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke_isdead.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke_reregister.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke_reregister.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister_newowner.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke_reregister_newowner.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_reregister_newowner.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke_reregister_newowner.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_snv.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke_snv.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_revoke_snv.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_revoke_snv.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_snv.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_snv.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_snv.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_snv.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_accounts.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_accounts.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_accounts.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_accounts.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_accounts_nodatakey.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_accounts_nodatakey.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_accounts_nodatakey.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_accounts_nodatakey.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_auth.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_auth.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_auth.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_auth.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_blockchain_id.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_blockchain_id.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_blockchain_id.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_blockchain_id.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_multiservice.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_multiservice.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_multiservice.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_multiservice.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_multiservice_failedservice.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_multiservice_failedservice.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_multiservice_failedservice.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_multiservice_failedservice.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_multiuser.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_multiuser.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_multiuser.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_multiuser.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_rmtree.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_rmtree.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_rmtree.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_rmtree.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_stale_directory.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_stale_directory.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_stale_directory.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_stale_directory.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_stale_file.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_stale_file.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_datastore_stale_file.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_datastore_stale_file.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_publish.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_publish.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_app_publish.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_app_publish.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas_chain.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas_chain.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas_chain.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas_chain.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas_churn.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas_churn.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas_churn.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas_churn.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas_mesh.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas_mesh.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas_mesh.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas_mesh.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas_nat.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas_nat.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas_nat.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas_nat.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas_storage.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas_storage.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_atlas_storage.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_atlas_storage.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_cantforce.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_cantforce.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_cantforce.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_cantforce.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_datakey_migration.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_datakey_migration.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_datakey_migration.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_datakey_migration.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deleteimmutable.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_deleteimmutable.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deleteimmutable.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_deleteimmutable.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deleteimmutable_nodatakey.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_deleteimmutable_nodatakey.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deleteimmutable_nodatakey.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_deleteimmutable_nodatakey.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deletemutable.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_deletemutable.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deletemutable.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_deletemutable.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deletemutable_nodatakey.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_deletemutable_nodatakey.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_deletemutable_nodatakey.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_deletemutable_nodatakey.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_expire_reregister.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_expire_reregister.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_expire_reregister.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_expire_reregister.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_expire_reregister_failure.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_expire_reregister_failure.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_expire_reregister_failure.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_expire_reregister_failure.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_getpublickey.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_getpublickey.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_getpublickey.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_getpublickey.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_history.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_history.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_history.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_history.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_import_wallet.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_import_wallet.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_import_wallet.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_import_wallet.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_import_wallet_multisig.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_import_wallet_multisig.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_import_wallet_multisig.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_import_wallet_multisig.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_legacy_013_wallet.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_legacy_013_wallet.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_legacy_013_wallet.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_legacy_013_wallet.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_legacy_014_wallet.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_legacy_014_wallet.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_legacy_014_wallet.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_legacy_014_wallet.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_legacy_wallet.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_legacy_wallet.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_legacy_wallet.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_legacy_wallet.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_listhistory.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_listhistory.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_listhistory.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_listhistory.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_listimmutablehistory.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_listimmutablehistory.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_listimmutablehistory.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_listimmutablehistory.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_migrateprofile.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_migrateprofile.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_migrateprofile.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_migrateprofile.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_migrateprofile_nodatakey.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_migrateprofile_nodatakey.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_migrateprofile_nodatakey.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_migrateprofile_nodatakey.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_migrateprofile_nozonefilekey.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_migrateprofile_nozonefilekey.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_migrateprofile_nozonefilekey.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_migrateprofile_nozonefilekey.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_multidevice_storage.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_multidevice_storage.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_multidevice_storage.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_multidevice_storage.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_nonstandard_zonefile.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_nonstandard_zonefile.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_nonstandard_zonefile.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_nonstandard_zonefile.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_notstale.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_notstale.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_notstale.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_notstale.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putimmutable.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_putimmutable.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putimmutable.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_putimmutable.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putimmutable_nodatakey.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_putimmutable_nodatakey.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putimmutable_nodatakey.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_putimmutable_nodatakey.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putmutable.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_putmutable.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putmutable.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_putmutable.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putmutable_nodatakey.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_putmutable_nodatakey.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putmutable_nodatakey.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_putmutable_nodatakey.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putmutable_nozonefilekey.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_putmutable_nozonefilekey.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_putmutable_nozonefilekey.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_putmutable_nozonefilekey.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_renew.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_renew.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_renew.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_renew.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_revoke.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_revoke.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_revoke.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_revoke.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_revoke_reregister_update.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_revoke_reregister_update.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_revoke_reregister_update.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_revoke_reregister_update.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_sign_verify_data.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_sign_verify_data.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_sign_verify_data.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_sign_verify_data.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_snv.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_snv.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_snv.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_snv.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_storage_gateway.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_storage_gateway.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_storage_gateway.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_storage_gateway.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_update_transfer.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_update_transfer.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_update_transfer.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_update_transfer.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_upgrade_storage.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_upgrade_storage.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_upgrade_storage.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_upgrade_storage.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_user_storage.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_user_storage.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_user_storage.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_user_storage.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_cantsteal.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_cantsteal.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_cantsteal.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_cantsteal.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_delays.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_delays.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_delays.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_delays.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_expire_reregister.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_expire_reregister.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_expire_reregister.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_expire_reregister.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_expire_reregister_delays.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_expire_reregister_delays.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_expire_reregister_delays.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_expire_reregister_delays.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_expire_reregister_failure.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_expire_reregister_failure.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_expire_reregister_failure.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_expire_reregister_failure.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_nokeepdata_update_transfer_update_transfer_nokeepdata.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_nokeep_up_xfer_up_xfer_nokeep.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_nokeepdata_update_transfer_update_transfer_nokeepdata.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_nokeep_up_xfer_up_xfer_nokeep.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_nokeepdata.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_nokeepdata.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_nokeepdata.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_nokeepdata.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_renew_expire_reregister.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_renew_expire_reregister.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_renew_expire_reregister.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_renew_expire_reregister.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_renew_expire_reregister_failure.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_renew_expire_reregister_failure.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_renew_expire_reregister_failure.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_renew_expire_reregister_failure.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_renew_interleaving.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_renew_interleaving.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_renew_interleaving.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_renew_interleaving.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_renew_revoke_verify_multi.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_renew_revoke_verify_multi.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_renew_revoke_verify_multi.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_renew_revoke_verify_multi.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_renew_revoke_verify_multi_multisig.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_renew_revoke_verify_multi_multisig.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_renew_revoke_verify_multi_multisig.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_renew_revoke_verify_multi_multisig.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_revoke_verify_multi.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_revoke_verify_multi.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_revoke_verify_multi.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_revoke_verify_multi.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_update_transfer_nokeepdata_update_transfer.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_up_xfer_nokeepdata_up_xfer.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_update_transfer_nokeepdata_update_transfer.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_up_xfer_nokeepdata_up_xfer.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_utxos.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_utxos.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_utxos.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_utxos.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_verify.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_verify.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_update_transfer_verify.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_up_xfer_verify.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_cantforce.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_cantforce.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_cantforce.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_cantforce.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_nokeepdata.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_nokeepdata.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_nokeepdata.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_nokeepdata.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_nokeepdata_update.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_nokeepdata_update.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_nokeepdata_update.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_nokeepdata_update.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_nokeepdata_update_cantforce.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_nokeepdata_update_cantforce.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_nokeepdata_update_cantforce.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_nokeepdata_update_cantforce.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_renew.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_renew.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_renew.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_renew.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_renew_update.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_renew_update.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_renew_update.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_renew_update.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_revoke.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_revoke.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_revoke.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_revoke.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_snv.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_snv.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_snv.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_snv.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_transfer.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_transfer.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_transfer.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_transfer.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_transfer_nextepoch_transfer_multisig.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_transfer_nextepoch_transfer_multisig.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_transfer_nextepoch_transfer_multisig.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_transfer_nextepoch_transfer_multisig.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_transfer_update.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_transfer_update.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_transfer_update.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_transfer_update.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_expire_reregister_delays_failure.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_up_expire_rereg_delays_failure.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_expire_reregister_delays_failure.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_up_expire_rereg_delays_failure.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer_condensed_multisig_singlesig_delays.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_up_xfer_condensed_multi_single_delays.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer_condensed_multisig_singlesig_delays.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_up_xfer_condensed_multi_single_delays.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer_condensed_multisig_singlesig.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_up_xfer_condensed_multisig_singlesig.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer_condensed_multisig_singlesig.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_up_xfer_condensed_multisig_singlesig.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_delays.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_delays.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_delays.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_delays.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_expire_reregister_delays.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_expire_reregister_delays.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_expire_reregister_delays.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_expire_reregister_delays.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_transfer.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_transfer.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer_condensed.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_transfer_condensed.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer_condensed.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_transfer_condensed.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer_condensed_multisig.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_transfer_condensed_multisig.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer_condensed_multisig.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_transfer_condensed_multisig.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer_condensed_nokeepdata.py b/integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_transfer_condensed_nokeepdata.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/name_preorder_register_transfer_update_transfer_condensed_nokeepdata.py rename to integration_tests/blockstack_integration_tests/scenarios/name_pre_reg_xfer_update_transfer_condensed_nokeepdata.py diff --git a/integration_tests/blockstack_integration_tests/scenarios/namespace_preorder_reveal_import_expire_preorder_reveal_import.py b/integration_tests/blockstack_integration_tests/scenarios/namespace_pre_reveal_imp_expire_pre_reveal_imp.py similarity index 100% rename from integration_tests/blockstack_integration_tests/scenarios/namespace_preorder_reveal_import_expire_preorder_reveal_import.py rename to integration_tests/blockstack_integration_tests/scenarios/namespace_pre_reveal_imp_expire_pre_reveal_imp.py diff --git a/integration_tests/blockstack_integration_tests/tests_skip.txt b/integration_tests/blockstack_integration_tests/tests_skip.txt index 1a7901df6..d1439f56c 100644 --- a/integration_tests/blockstack_integration_tests/tests_skip.txt +++ b/integration_tests/blockstack_integration_tests/tests_skip.txt @@ -1,7 +1,9 @@ +# extras for test-launcher +__init__ +attic # list of tests to ignore virtualchain_abort name_preorder_register_update_file_benchmark - # skip multi-preorder and multi-register for now, since it's not ready name_preorder_multi name_preorder_multi_preorder_register @@ -12,28 +14,31 @@ name_preorder_multi_register_multipleblocks_snv name_preorder_multi_register_nochangeaddress name_preorder_multi_register_update_transfer_renew_revoke_verify name_preorder_multi_register_update_transfer_renew_revoke_verify_snv - # will likely never work again rpc_register_multi_parallel - # superceded name_preorder_register_update_file name_preorder_register_upadte_file_nodatakey name_preorder_register_update_file_benchmark - # GPG is broken name_preorder_register_update_gpg name_preorder_register_update_gpg_nodatakey - # in development name_preorder_register_update_multidevice_storage name_preorder_register_update_storage_gateway name_preorder_register_update_upgrade_storage rpc_register_nextepoch_wallet - # superceded by better functionality name_preorder_register_update_blockstackurl name_preorder_register_update_blockstackurl_nodatakey name_preorder_register_update_blockstackurl_nozonefilekey rest_stores rest_stores_rmtree +# NOT WORKING per @kantai +name_preorder_register_update_app_datastore_rmtree +name_preorder_register_update_app_datastore_stale_directory +name_preorder_register_update_app_datastore_stale_file +name_preorder_register_update_datakey_migration +name_preorder_register_update_deletemutable +name_preorder_register_update_deletemutable_nodatakey +name_preorder_register_update_nonstandard_zonefile diff --git a/integration_tests/deployment/docker/Dockerfile.dev b/integration_tests/deployment/docker/Dockerfile.dev new file mode 100644 index 000000000..74723802b --- /dev/null +++ b/integration_tests/deployment/docker/Dockerfile.dev @@ -0,0 +1,16 @@ +FROM ubuntu:xenial + +WORKDIR /src/blockstack + +# Install dependancies from apt +RUN apt-get update +RUN apt-get install -y python-pip python-dev libssl-dev libffi-dev rng-tools libgmp3-dev + +# Copy all files from the repo into the container +COPY . . + +# Upgrade pip and install pyparsing +RUN pip install --upgrade pip && pip install pyparsing + +# Install Blockstack from source +RUN pip install . diff --git a/integration_tests/deployment/docker/Dockerfile.tests b/integration_tests/deployment/docker/Dockerfile.tests new file mode 100644 index 000000000..9f049098f --- /dev/null +++ b/integration_tests/deployment/docker/Dockerfile.tests @@ -0,0 +1,47 @@ +FROM ubuntu:xenial + +# Install dependancies from apt +RUN apt-get update +RUN apt-get install -y python-pip python-dev libssl-dev libffi-dev rng-tools libgmp3-dev + +# Install Bitcoin +RUN apt-get -y update +RUN apt-get install -y python-software-properties +RUN apt-get install -y software-properties-common + +RUN add-apt-repository ppa:bitcoin/bitcoin +RUN apt-get update +RUN apt-get install -y bitcoind sqlite3 curl + +# Add standard username and password +RUN mkdir ~/.bitcoin +RUN echo "rpcuser=blockstack\nrpcpassword=blockstacksystem\n" > ~/.bitcoin/bitcoin.conf + +# Install NodeJS +RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - +RUN apt-get install -y nodejs + +# Install requirements for the blockstack.js integration tests +RUN apt-get install -y git babel +RUN npm i -g browserify +RUN git clone https://git@github.com/blockstack/blockstack.js.git /tmp/blockstack.js +RUN git clone https://github.com/blockstack/blockstack-storage-js.git /tmp/blockstack-storage-js +RUN cd /tmp/blockstack.js && npm ln +RUN cd /tmp/blockstack-storage-js && npm ln + +# Install pyparsing +RUN pip install --upgrade pip && pip install pyparsing + +# Build blockstack first +WORKDIR /src/blockstack + +# Copy all files from the repo into the container +COPY . . + +# Install Blockstack from source +RUN pip install . + +# Change into the tests directory +WORKDIR /src/blockstack/integration_tests + +RUN ./setup.py build && ./setup.py install diff --git a/integration_tests/setup.py b/integration_tests/setup.py index dc29eb8d1..701607c78 100755 --- a/integration_tests/setup.py +++ b/integration_tests/setup.py @@ -30,7 +30,8 @@ setup( install_requires=[ 'blockstack>=0.14.2', 'pybitcoin>=0.9.8', - 'xmlrunner>=1.7.7' + 'xmlrunner>=1.7.7', + 'influxdb>=4.1.1' ], classifiers=[ 'Intended Audience :: Developers', diff --git a/integration_tests/terminal-out.tmpl b/integration_tests/terminal-out.tmpl new file mode 100644 index 000000000..27824b210 --- /dev/null +++ b/integration_tests/terminal-out.tmpl @@ -0,0 +1,14 @@ +{{ range .items -}} +{{ $status := index .status.containerStatuses 0 }} +{{- if $status.state.running -}} +{{ "[0] RUNNING : " }}{{ $status.state.running.startedAt }}{{ " " }}{{ .metadata.labels.test }}{{"\n"}} +{{- end -}} +{{- if $status.state.terminated -}} +{{- if eq $status.state.terminated.reason "Completed" -}} +{{ "[ ] COMPLETED : " }}{{ $status.state.terminated.finishedAt }}{{ " " }}{{ .metadata.labels.test }}{{"\n"}} +{{- end -}} +{{- if eq $status.state.terminated.reason "Error" -}} +{{ "[X] FAILED : " }}{{ $status.state.terminated.finishedAt }}{{ " " }}{{ .metadata.labels.test }}{{"\n"}} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/integration_tests/test-launcher b/integration_tests/test-launcher new file mode 100755 index 000000000..12dbbcb73 --- /dev/null +++ b/integration_tests/test-launcher @@ -0,0 +1,361 @@ +#!/bin/bash + +# This script provides a simple interface for running the integration tests in docker + +# Docker Image Settings +testImage=quay.io/blockstack/integrationtests +testTag=latest + +# Git Branch and commit information +gitCommit=$(git rev-parse --short HEAD) +gitBranch=$(git rev-parse --abbrev-ref HEAD) + +# Test directories +repoDir=$(git rev-parse --show-toplevel) +testDir=$repoDir/integration_tests +outputDir=$testDir/test-out +testOutputDir=$outputDir/$gitBranch-$gitCommit + +# Dockerfile +testDF=$testDir/deployment/docker/Dockerfile.tests + +# Pull Influx configuration from ENV +influxHost=$INFLUX_HOST +influxUser=$INFLUX_USER +influxPass=$INFLUX_PASS +influxSSL=$INFLUX_SSL + +# Set the number of containers to run to the number of logical cores in the system +# This prevents CPU contention in the container which leads to Bitcoind calls timing out +numContainers=1 +if [[ $(uname) == 'Linux' ]]; then + # Pull from /proc/cpuinfo on Linux + numContainers=$(grep -c ^processor /proc/cpuinfo) +elif [[ $(uname) == 'Darwin' ]]; then + # Pull from sysctl on Mac + numContainers=$(sysctl -n hw.logicalcpu) +fi + +# Build the test container +build-image () { + # Build testing container from blockstack-core:dev + echo "Building test image from core image :$gitCommit" + echo "docker build -f $testDF -t $testImage:$testTag $repoDir" + docker build -f $testDF -t $testImage:$testTag $repoDir + docker tag $testImage:$testTag $testImage:$gitCommit +} + +# Push the test containers to .acr +push-image () { + # First build the tests to push + build-image + + # Then push testing image to registry + echo "Pushing test image from core image :$gitCommit" + docker push $testImage:$gitCommit + docker push $testImage:$testTag +} + +# Division formatting for percent +percent () { + awk "BEGIN { pc=100*${1}/${2}; i=int(pc); print (pc-i<0.5)?i:i+1 }" +} + +# Outputs the array of tests to run +tests () { + # Get test scenarios + local scenarios=($(ls -1 $(pwd)/blockstack_integration_tests/scenarios/ | sed -e 's/\.py$//')) + + # Declare arrays for Tests to Skip and Output + declare -a skips + declare -a out + + # Make skips array from file + while read -r line; do + [[ "$line" =~ ^#.*$ ]] && continue + skips+=("$line") + done < "./blockstack_integration_tests/tests_skip.txt" + + # Loop through scenarios + for sc in "${scenarios[@]}"; do + if [[ ${skips[*]} =~ $sc ]]; then + continue + else + out+=($sc) + fi + done + echo "${out[@]}" +} + +make-manifest () { + local name=$(echo $1 | sed -e 's/_/-/g') + cat <<-EOF > $testDir/tmp/$gitCommit/$1.yaml +apiVersion: v1 +kind: Pod +metadata: + name: "$name" + namespace: "$gitCommit" + labels: + commit: "$gitCommit" + test: "$1" +spec: + restartPolicy: Never + containers: + - name: integration-test-run + image: "$testImage:$gitCommit" + imagePullPolicy: "Always" + command: ["blockstack-test-scenario", "blockstack_integration_tests.scenarios.$1", "--influx"] + env: + - name: GIT_COMMIT + value: "$gitCommit" + - name: GIT_BRANCH + value: "$gitBranch" + - name: INFLUX_HOST + value: "$influxHost" + - name: INFLUX_USER + value: "$influxUser" + - name: INFLUX_PASS + value: "$influxPass" + - name: INFLUX_SSL + value: "$influxSSL" + - name: NUM_TESTS + value: $2 + resources: + limits: + cpu: 1000m + memory: 4Gi + requests: + cpu: 1000m + memory: 1Gi +EOF +} + +# Runs all tests in Kubernetes +run-all-kube () { + local tmpDir=$testDir/tmp/$gitCommit + local scenarios=$(tests) + local numTests=${#scenarios[@]} + + # Create kubernetes namespace + kubectl create ns $gitCommit + + # Make tmp directory + mkdir -p $tmpDir + + # Make the manifests to launch the pods + for sc in $scenarios; do + make-manifest $sc $numTests + kubectl apply -f $tmpDir/$sc + done + + # Remove the temporary files + rm -rf $tmpDir +} + +# Run 1 test in Kubernetes +run-one-kube () { + local tmpDir=$testDir/tmp/$gitCommit + local numTests=1 + + # Check for test name arguement + if [ $# -eq 0 ]; then + echo "need to input name of test to run" + echo "to get a list of tests run see blockstack_integration_tests/scenarios" + exit 1 + fi + + # Create kubernetes namespace + kubectl create ns $gitCommit + + # Make tmp directory + mkdir -p $tmpDir/tmp/$gitCommit + + # Create the manifest file + make-manifest $1 $numTests + + # Run it + kubectl apply -f $tmpDir/$1.yaml + + # Remove temporary files + rm -rf $tmpDir +} + +# Just delete the namespace where all the pods where. +clean-all-kube () { + echo "removing all tests in namespace $gitCommit" + kubectl delete ns $gitCommit +} + +# Runs all the tests in seperate docker containers +run-all-local () { + # List of test scenarios to run + local scenarios=$(tests) + + # Loop through all test scenarios + for sc in $scenarios; do + + # local variables for each scenario + local command="blockstack-test-scenario blockstack_integration_tests.scenarios.$sc" + + # Limit number of running docker containers to number of cores on the system + while [ $(docker ps -q -f status=running -f name="$gitCommit" | wc -l) -ge $numContainers ]; do + sleep 5 + done + + # Run the docker image, pipe test logs to output folder + docker run -d --name "$sc-$gitCommit" $testImage:$testTag $command >> /dev/null 2>&1 + done + + # Wait for tests to finish before exiting + echo "All tests running. Waiting for tests to finish..." + while [ $(docker ps -q -f status=running -f name="$gitCommit" | wc -l) -ge 0 ]; do + sleep 10 + done +} + +# Run one test locally +run-one-local () { + local outputdir=$testOutputDir/$1/ + local containerdir=/tmp/ + local command="blockstack-test-scenario blockstack_integration_tests.scenarios.$1" + + if [ $# -eq 0 ]; then + echo "need to input name of test to run" + echo "to get a list of tests run see blockstack_integration_tests/scenarios" + exit 1 + fi + + docker run -d \ + --name "$1-$gitCommit-mounted" \ + --net=host \ + -v $outputdir:$containerdir \ + $testImage:$testTag $command >> /dev/null 2>&1 +} + +# Prints out the results in a human readable fashion +results-local () { + local exited=$(docker ps -a -q -f status=exited -f name="$gitCommit") + for test in $exited; do + local success=$(docker logs $test --tail 100 2>&1 | grep -c "SUCCESS") + local failure=$(docker logs $test --tail 100 2>&1 | grep -c "FAILURE") + local name=$(docker inspect -f '{{.Name}}' $test) + local runtime=$(get-runtime-kube $test) + if [ $success -eq 1 ]; then + echo "[ ] SUCCESS in $(expr $runtime / 60)m $(expr $runtime % 60)s -> $name" + elif [ $failure -eq 1 ]; then + echo "[X] FAILURE in $(expr $runtime / 60)m $(expr $runtime % 60)s -> $name (docker logs $test)" + else + echo "Might want to look at this container: docker logs $test" + fi + done +} + +# Prints out the results in format for insertion into InfluxDB +write-local () { + local exited=$(docker ps -a -q -f status=exited -f name="$gitCommit") + local reportTime=$(date +%s) + local importFile=$testDir/influx.txt + + # Clear importFile + rm -f $importFile + + # Write DDL and DML + echo "# DDL" >> $importFile + echo "CREATE DATABASE testing" >> $importFile + echo "" >> $importFile + echo "# DML" >> $importFile + echo "# CONTEXT-DATABASE: testing" >> $importFile + echo "# CONTEXT-RETENTION-POLICY: autogen" >> $importFile + echo "" >> $importFile + + # Loop through tests and write points + for test in $exited; do + local success=$(docker logs $test --tail 100 2>&1 | grep -c "SUCCESS") + local failure=$(docker logs $test --tail 100 2>&1 | grep -c "FAILURE") + local name=$(docker inspect -f '{{.Name}}' $test) + local runtime=$(get-runtime-kube $test) + if [ $success -eq 1 ]; then + echo "integration_tests,git_commit=$gitCommit,git_branch=$gitBranch,test_scenario=$name,success=true runtime=${runtime}i $reportTime" >> $importFile + elif [ $failure -eq 1 ]; then + echo "integration_tests,git_commit=$gitCommit,git_branch=$gitBranch,test_scenario=$name,success=false runtime=${runtime}i $reportTime" >> $importFile + fi + done + + # Write the data to configured influx instance + influx -host $influxHost -ssl -username $influxUser -password $influxPass -import -path $importFile -precision "s" + + # Remove the importFile + rm $importFile +} + +commands () { + cat <<-EOF +BLOCKSTACK DOCKER TEST LAUNCHER: + Build and push testing docker images: + build-image -> build the test container (for local testing) + push-image -> build and push tests image to container registry (for kubernetes testing) + + Running tests on local Docker daemon: + run-one-local -> run one test locally (pass test name) + run-all-local -> loop through the tests runing $numContainers at a time + results-local -> check results from finished tests + write-local -> write test results to a configured influx instance (need to configure) + progress-local -> log progress in the test suite + cleanup-files-local -> remove all files from test + cleanup-docker-local -> cleanup docker containers from test + + Run tests against a Kubernetes Cluster, special configruation needed: + run-all-kube -> run all tests as kubernetes pods in $gitCommit namespace + run-one-kube -> run single test in a kubernetes pod (pass test name) + clean-all-kube -> remove testing namespace ($gitCommit) and delete pods +EOF +} + +case $1 in + build-image) + build-image + ;; + push-image) + push-image + ;; + run-all-local) + run-all-local + ;; + run-one-local) + run-one-local $2 + ;; + results-local) + results-local + ;; + write-local) + write-local + ;; + progress-local) + local inprogress=$(expr $(docker ps -f status=running -f name="$gitCommit" | wc -l) - 1) + local completed=$(expr $(docker ps -a -f status=exited -f name="$gitCommit" | wc -l) - 1) + local totaltests=$(expr $(ls -1 $(pwd)/blockstack_integration_tests/scenarios/ | sed -e 's/\.py$//' | wc -l) - 2) + local remaining=$(expr $totaltests - $(expr $inprogress + $completed)) + echo "TotalTests: $totaltests, Completed: $(percent $completed $totaltests)%, InProgress: $(percent $inprogress $totaltests)%, Remaining: $(percent $remaining $totaltests)%" + ;; + cleanup-files-local) + echo "Removing container /tmp data $testOutputDir..." + rm -rf $testOutputDir + ;; + cleanup-docker-local) + echo "Removing all test docker containers..." + docker stop $(docker ps -a -q -f name="$gitCommit") > /dev/null 2>&1 + docker rm $(docker ps -a -q -f name="$gitCommit") > /dev/null 2>&1 + ;; + run-all-kube) + run-all-kube + ;; + clean-all-kube) + clean-all-kube + ;; + run-one-kube) + run-one-kube $2 + ;; + *) + commands + ;; +esac