MCPcopy Create free account
hub / github.com/bitshares/bitshares-core / cli_fixture

Method cli_fixture

tests/cli/main.cpp:286–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284 std::vector<std::string> nathan_keys;
285
286 cli_fixture() :
287 server_port_number(0),
288 app_dir( graphene::utilities::temp_directory_path() ),
289 app1( start_application(app_dir, server_port_number) ),
290 con( app1, app_dir, server_port_number ),
291 nathan_keys( {"5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"} )
292 {
293 BOOST_TEST_MESSAGE("Setup cli_wallet::boost_fixture_test_case");
294
295 using namespace graphene::chain;
296 using namespace graphene::app;
297
298 try
299 {
300 BOOST_TEST_MESSAGE("Setting wallet password");
301 con.wallet_api_ptr->set_password("supersecret");
302 con.wallet_api_ptr->unlock("supersecret");
303
304 // import Nathan account
305 BOOST_TEST_MESSAGE("Importing nathan key");
306 BOOST_CHECK_EQUAL(nathan_keys[0], "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3");
307 BOOST_CHECK(con.wallet_api_ptr->import_key("nathan", nathan_keys[0]));
308 } catch( fc::exception& e ) {
309 edump((e.to_detail_string()));
310 throw;
311 }
312 }
313
314 ~cli_fixture()
315 {

Callers

nothing calls this directly

Calls 5

temp_directory_pathFunction · 0.85
start_applicationFunction · 0.85
set_passwordMethod · 0.80
unlockMethod · 0.80
import_keyMethod · 0.45

Tested by

no test coverage detected