Skip to content

Commit

Permalink
GH-54 Now that txn_test_gen_plugin has been removed eosio.token can m…
Browse files Browse the repository at this point in the history
…ove back into ./unittests/contracts and ./libraries/testing/CMakeLists.txt can go back to eosio_testing_contracts being INTERFACE only.
  • Loading branch information
heifner committed Jan 12, 2023
1 parent b3a6e00 commit dd66bfc
Show file tree
Hide file tree
Showing 28 changed files with 80 additions and 86 deletions.
10 changes: 3 additions & 7 deletions libraries/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,16 @@ endif()
file(GLOB HEADERS "include/eosio/testing/*.hpp")

configure_file(contracts.hpp.in include/testing_contracts/contracts.hpp ESCAPE_QUOTES)
add_library(eosio_testing_contracts ${CMAKE_CURRENT_BINARY_DIR}/contracts.cpp)
target_include_directories( eosio_testing_contracts
PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/include/testing_contracts"
"${CMAKE_SOURCE_DIR}/libraries/libfc/include")
if( EOSIO_COMPILE_TEST_CONTRACTS )
add_dependencies( eosio_testing_contracts testing_contracts_project)
endif()
add_library(eosio_testing_contracts INTERFACE)
target_include_directories(eosio_testing_contracts INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/include/testing_contracts)

configure_file(contracts.cpp.in contracts.cpp ESCAPE_QUOTES)

## SORT .cpp by most likely to change / break compile
add_library( eosio_testing
tester.cpp
tester_network.cpp
${CMAKE_CURRENT_BINARY_DIR}/contracts.cpp
${HEADERS}
)

Expand Down
1 change: 0 additions & 1 deletion libraries/testing/contracts.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ namespace eosio::testing {
}

MAKE_EMBEDDED_WASM_ABI(eosio_bios, eosio.bios, contracts)
MAKE_EMBEDDED_WASM_ABI(eosio_token, eosio.token, contracts)
MAKE_EMBEDDED_WASM_ABI(before_producer_authority_eosio_bios, eosio.bios, contracts/old_versions/v1.7.0-develop-preactivate_feature)
MAKE_EMBEDDED_WASM_ABI(before_preactivate_eosio_bios, eosio.bios, contracts/old_versions/v1.6.0-rc3)
1 change: 0 additions & 1 deletion libraries/testing/contracts.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace eosio {
struct contracts {
// Contracts in `libraries/testing/contracts' directory
MAKE_EMBD_WASM_ABI(eosio_bios)
MAKE_EMBD_WASM_ABI(eosio_token)

MAKE_EMBD_WASM_ABI(before_producer_authority_eosio_bios)
MAKE_EMBD_WASM_ABI(before_preactivate_eosio_bios)
Expand Down
5 changes: 0 additions & 5 deletions libraries/testing/contracts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,5 @@ endif()

add_subdirectory(eosio.bios)

# Once the deprecated txn_test_gen_plugin is removed this can move back to ./unittests/contracts
# Also ./libraries/testing/CMakeLists.txt can go back to eosio_testing_contracts being INTERFACE only
# See diff: https://github.com/AntelopeIO/leap/pull/612/commits/b9e99f0902aeba99bc4dc0ad90abf79b24f36523
add_subdirectory(eosio.token)

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/old_versions/v1.6.0-rc3/eosio.bios/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/old_versions/v1.6.0-rc3/eosio.bios/)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/old_versions/v1.7.0-develop-preactivate_feature/eosio.bios/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/old_versions/v1.7.0-develop-preactivate_feature/eosio.bios/)
2 changes: 1 addition & 1 deletion testnet.template
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ ecmd create account eosio eosio.token $pubsyskey $pubsyskey
ecmd create account eosio eosio.vpay $pubsyskey $pubsyskey
ecmd create account eosio eosio.wrap $pubsyskey $pubsyskey

ecmd set contract eosio.token libraries/testing/contracts/eosio.token eosio.token.wasm eosio.token.abi
ecmd set contract eosio.token unittests/contracts/eosio.token eosio.token.wasm eosio.token.abi
ecmd set contract eosio.msig unittests/contracts/eosio.msig eosio.msig.wasm eosio.msig.abi
ecmd set contract eosio.wrap unittests/contracts/eosio.wrap eosio.wrap.wasm eosio.wrap.abi

Expand Down
8 changes: 4 additions & 4 deletions tests/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def processCleosCommand(cmd):

def cleos_abi_file_test():
"""Test option --abi-file """
token_abi_path = os.path.abspath(os.getcwd() + '/libraries/testing/contracts/eosio.token/eosio.token.abi')
token_abi_path = os.path.abspath(os.getcwd() + '/unittests/contracts/eosio.token/eosio.token.abi')
system_abi_path = os.path.abspath(os.getcwd() + '/unittests/contracts/eosio.system/eosio.system.abi')
token_abi_file_arg = 'eosio.token' + ':' + token_abi_path
system_abi_file_arg = 'eosio' + ':' + system_abi_path
Expand Down Expand Up @@ -325,11 +325,11 @@ def abi_file_with_nodeos_test():
# push action token transfer with option `--abi-file`
global testSuccessful
try:
contractDir = os.path.abspath(os.getcwd() + "/libraries/testing/contracts/eosio.token")
contractDir = os.path.abspath(os.getcwd() + "/unittests/contracts/eosio.token")
# make a malicious abi file by switching 'from' and 'to' in eosio.token.abi
token_abi_path = os.path.abspath(os.getcwd() + '/libraries/testing/contracts/eosio.token/eosio.token.abi')
token_abi_path = os.path.abspath(os.getcwd() + '/unittests/contracts/eosio.token/eosio.token.abi')
token_abi_file_arg = 'eosio.token' + ':' + token_abi_path
malicious_token_abi_path = os.path.abspath(os.getcwd() + '/libraries/testing/contracts/eosio.token/malicious.eosio.token.abi')
malicious_token_abi_path = os.path.abspath(os.getcwd() + '/unittests/contracts/eosio.token/malicious.eosio.token.abi')
shutil.copyfile(token_abi_path, malicious_token_abi_path)
replaces = [["from", "malicious"], ["to", "from"], ["malicious", "to"]]
for replace in replaces:
Expand Down
12 changes: 6 additions & 6 deletions tests/get_table_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ BOOST_FIXTURE_TEST_CASE( get_scope_test, TESTER ) try {
create_accounts(accs);
produce_block();

set_code( "eosio.token"_n, contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, contracts::eosio_token_abi().data() );
set_code( "eosio.token"_n, test_contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, test_contracts::eosio_token_abi().data() );
produce_blocks(1);

// create currency
Expand Down Expand Up @@ -145,8 +145,8 @@ BOOST_FIXTURE_TEST_CASE( get_table_test, TESTER ) try {
create_accounts(accs);
produce_block();

set_code( "eosio.token"_n, contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, contracts::eosio_token_abi().data() );
set_code( "eosio.token"_n, test_contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, test_contracts::eosio_token_abi().data() );
produce_blocks(1);

// create currency
Expand Down Expand Up @@ -324,8 +324,8 @@ BOOST_FIXTURE_TEST_CASE( get_table_by_seckey_test, TESTER ) try {
create_accounts(accs);
produce_block();

set_code( "eosio.token"_n, contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, contracts::eosio_token_abi().data() );
set_code( "eosio.token"_n, test_contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, test_contracts::eosio_token_abi().data() );
produce_blocks(1);

// create currency
Expand Down
2 changes: 1 addition & 1 deletion tests/launcher_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
cluster.cleanup()
Print("Stand up cluster")
pnodes=4
abs_path = os.path.abspath(os.getcwd() + '/libraries/testing/contracts/eosio.token/eosio.token.abi')
abs_path = os.path.abspath(os.getcwd() + '/unittests/contracts/eosio.token/eosio.token.abi')
traceNodeosArgs=" --trace-rpc-abi eosio.token=" + abs_path
if cluster.launch(pnodes=pnodes, totalNodes=pnodes, extraNodeosArgs=traceNodeosArgs) is False:
cmdError("launcher")
Expand Down
2 changes: 1 addition & 1 deletion tests/nodeos_run_remote_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
(pnodes, total_nodes-pnodes, topo, delay))
Print("Stand up cluster")

abs_path = os.path.abspath(os.getcwd() + '/libraries/testing/contracts/eosio.token/eosio.token.abi')
abs_path = os.path.abspath(os.getcwd() + '/unittests/contracts/eosio.token/eosio.token.abi')
traceNodeosArgs = " --trace-rpc-abi eosio.token=" + abs_path
if cluster.launch(pnodes=pnodes, totalNodes=total_nodes, prodCount=prodCount, topo=topo, delay=delay, onlyBios=onlyBios, extraNodeosArgs=traceNodeosArgs) is False:
errorExit("Failed to stand up eos cluster.")
Expand Down
4 changes: 2 additions & 2 deletions tests/nodeos_run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
cluster.cleanup()
Print("Stand up cluster")

abs_path = os.path.abspath(os.getcwd() + '/libraries/testing/contracts/eosio.token/eosio.token.abi')
abs_path = os.path.abspath(os.getcwd() + '/unittests/contracts/eosio.token/eosio.token.abi')
traceNodeosArgs=" --http-max-response-time-ms 990000 --trace-rpc-abi eosio.token=" + abs_path
if cluster.launch(prodCount=prodCount, onlyBios=onlyBios, dontBootstrap=dontBootstrap, extraNodeosArgs=traceNodeosArgs) is False:
cmdError("launcher")
Expand Down Expand Up @@ -308,7 +308,7 @@
if hashNum != 0:
errorExit("FAILURE - get code currency1111 failed", raw=True)

contractDir="libraries/testing/contracts/eosio.token"
contractDir="unittests/contracts/eosio.token"
wasmFile="eosio.token.wasm"
abiFile="eosio.token.abi"
Print("Publish contract")
Expand Down
4 changes: 2 additions & 2 deletions tests/test_chain_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ class chain_plugin_tester : public TESTER {
create_accounts({ "eosio.token"_n, "eosio.ram"_n, "eosio.ramfee"_n, "eosio.stake"_n,
"eosio.bpay"_n, "eosio.vpay"_n, "eosio.saving"_n, "eosio.names"_n, "eosio.rex"_n });

set_code( "eosio.token"_n, contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, contracts::eosio_token_abi().data() );
set_code( "eosio.token"_n, test_contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, test_contracts::eosio_token_abi().data() );

{
const auto& accnt = control->db().get<account_object,by_name>( "eosio.token"_n );
Expand Down
2 changes: 1 addition & 1 deletion tests/trace_plugin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def cleanEnv(self, shouldCleanup: bool) :
# start keosd and nodeos
def startEnv(self) :
account_names = ["alice", "bob", "charlie"]
abs_path = os.path.abspath(os.getcwd() + '/libraries/testing/contracts/eosio.token/eosio.token.abi')
abs_path = os.path.abspath(os.getcwd() + '/unittests/contracts/eosio.token/eosio.token.abi')
traceNodeosArgs = " --trace-rpc-abi eosio.token=" + abs_path
self.cluster.launch(totalNodes=1, extraNodeosArgs=traceNodeosArgs)
self.walletMgr.launch()
Expand Down
4 changes: 2 additions & 2 deletions unittests/bootseq_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ BOOST_FIXTURE_TEST_CASE( bootseq_test, bootseq_tester ) {
test_contracts::eosio_msig_wasm(),
test_contracts::eosio_msig_abi().data());//, &eosio_active_pk);
set_code_abi("eosio.token"_n,
contracts::eosio_token_wasm(),
contracts::eosio_token_abi().data()); //, &eosio_active_pk);
test_contracts::eosio_token_wasm(),
test_contracts::eosio_token_abi().data()); //, &eosio_active_pk);

// Set privileged for eosio.msig and eosio.token
set_privileged("eosio.msig"_n);
Expand Down
1 change: 1 addition & 0 deletions unittests/contracts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ endif()

add_subdirectory(eosio.msig)
add_subdirectory(eosio.system)
add_subdirectory(eosio.token)
add_subdirectory(eosio.wrap)
2 changes: 1 addition & 1 deletion unittests/contracts/eosio.system/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if( EOSIO_COMPILE_TEST_CONTRACTS )
target_include_directories(eosio.system
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/../../../libraries/testing/contracts/eosio.token)
${CMAKE_CURRENT_SOURCE_DIR}/../eosio.token)
else()
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/eosio.system.wasm ${CMAKE_CURRENT_BINARY_DIR}/eosio.system.wasm COPYONLY )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/eosio.system.abi ${CMAKE_CURRENT_BINARY_DIR}/eosio.system.abi COPYONLY )
Expand Down
4 changes: 2 additions & 2 deletions unittests/currency_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ class currency_tester : public TESTER {
}

currency_tester()
:TESTER(),abi_ser(json::from_string(contracts::eosio_token_abi().data()).as<abi_def>(), abi_serializer::create_yield_function( abi_serializer_max_time ))
:TESTER(),abi_ser(json::from_string(test_contracts::eosio_token_abi().data()).as<abi_def>(), abi_serializer::create_yield_function( abi_serializer_max_time ))
{
create_account( "eosio.token"_n);
set_code( "eosio.token"_n, contracts::eosio_token_wasm() );
set_code( "eosio.token"_n, test_contracts::eosio_token_wasm() );

auto result = push_action("eosio.token"_n, "create"_n, mutable_variant_object()
("issuer", eosio_token)
Expand Down
53 changes: 27 additions & 26 deletions unittests/delay_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <boost/test/unit_test.hpp>

#include <contracts.hpp>
#include <test_contracts.hpp>

#ifdef NON_VALIDATING_TEST
#define TESTER tester
Expand Down Expand Up @@ -100,8 +101,8 @@ BOOST_AUTO_TEST_CASE( link_delay_direct_test ) { try {
chain.create_account("eosio.token"_n);
chain.produce_blocks(10);

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -238,8 +239,8 @@ BOOST_AUTO_TEST_CASE(delete_auth_test) { try {
chain.create_account("eosio.token"_n);
chain.produce_blocks(10);

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -375,8 +376,8 @@ BOOST_AUTO_TEST_CASE( link_delay_direct_parent_permission_test ) { try {
chain.create_account("eosio.token"_n);
chain.produce_blocks(10);

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -513,8 +514,8 @@ BOOST_AUTO_TEST_CASE( link_delay_direct_walk_parent_permissions_test ) { try {
chain.create_account("eosio.token"_n);
chain.produce_blocks(10);

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -657,8 +658,8 @@ BOOST_AUTO_TEST_CASE( link_delay_permission_change_test ) { try {
chain.create_account("eosio.token"_n);
chain.produce_blocks(10);

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -848,8 +849,8 @@ BOOST_AUTO_TEST_CASE( link_delay_permission_change_with_delay_heirarchy_test ) {
chain.create_account("eosio.token"_n);
chain.produce_blocks(10);

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -1045,8 +1046,8 @@ BOOST_AUTO_TEST_CASE( link_delay_link_change_test ) { try {
chain.create_account("eosio.token"_n);
chain.produce_blocks(10);

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -1247,8 +1248,8 @@ BOOST_AUTO_TEST_CASE( link_delay_unlink_test ) { try {
chain.create_account("eosio.token"_n);
chain.produce_blocks(10);

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -1436,8 +1437,8 @@ BOOST_AUTO_TEST_CASE( link_delay_link_change_heirarchy_test ) { try {
chain.create_account("eosio.token"_n);
chain.produce_blocks(10);

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -1625,8 +1626,8 @@ BOOST_AUTO_TEST_CASE( mindelay_test ) { try {
chain.create_account("eosio.token"_n);
chain.produce_blocks(10);

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -1757,8 +1758,8 @@ BOOST_AUTO_TEST_CASE( canceldelay_test ) { try {
chain.create_account("eosio.token"_n);
chain.produce_blocks(10);

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -1994,8 +1995,8 @@ BOOST_AUTO_TEST_CASE( canceldelay_test2 ) { try {
chain.create_account("eosio.token"_n);
chain.produce_blocks();

chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down Expand Up @@ -2280,8 +2281,8 @@ BOOST_AUTO_TEST_CASE( max_transaction_delay_execute ) { try {
const auto& tester_account = "tester"_n;

chain.create_account("eosio.token"_n);
chain.set_code("eosio.token"_n, contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, contracts::eosio_token_abi().data());
chain.set_code("eosio.token"_n, test_contracts::eosio_token_wasm());
chain.set_abi("eosio.token"_n, test_contracts::eosio_token_abi().data());

chain.produce_blocks();
chain.create_account("tester"_n);
Expand Down
5 changes: 3 additions & 2 deletions unittests/eosio.token_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <boost/test/unit_test.hpp>

#include <contracts.hpp>
#include <test_contracts.hpp>

using namespace eosio::testing;
using namespace eosio;
Expand All @@ -27,8 +28,8 @@ class eosio_token_tester : public tester {
create_accounts( { "alice"_n, "bob"_n, "carol"_n, "eosio.token"_n } );
produce_blocks( 2 );

set_code( "eosio.token"_n, contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, contracts::eosio_token_abi().data() );
set_code( "eosio.token"_n, test_contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, test_contracts::eosio_token_abi().data() );

produce_blocks();

Expand Down
4 changes: 2 additions & 2 deletions unittests/eosio_system_tester.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class eosio_system_tester : public TESTER {

produce_blocks( 100 );

set_code( "eosio.token"_n, contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, contracts::eosio_token_abi().data() );
set_code( "eosio.token"_n, test_contracts::eosio_token_wasm() );
set_abi( "eosio.token"_n, test_contracts::eosio_token_abi().data() );

{
const auto& accnt = control->db().get<account_object,by_name>( "eosio.token"_n );
Expand Down
Loading

0 comments on commit dd66bfc

Please sign in to comment.