def tearDown(): """ clear env """ cmd = "./teracli disable model_table" common.exe_and_check_res(cmd) cmd = "./teracli drop model_table" common.exe_and_check_res(cmd)
def setUp(): ''' setup ''' common.drop_table("single_row_txn_test") cmd = "./teracli create 'single_row_txn_test<txn=on>{lg0{cf0}}'" common.exe_and_check_res(cmd)
def test_get_table(): common.print_debug_msg(3, "read data form table_test001 and table_test002") cmd = "./teracli get table_test001 test001key update_flag:test001q" common.exe_and_check_res(cmd) cmd = "./teracli get table_test002 test002key" common.exe_and_check_res(cmd)
def test_put_table(): common.print_debug_msg(2, "put one data to table_test001 and table_test002") cmd = "./teracli put table_test001 test001key update_flag:test001q test001v" common.exe_and_check_res(cmd) cmd = "./teracli put table_test002 test002key test002v" common.exe_and_check_res(cmd) '''
def setUp(): """ set env """ common.print_debug_msg(0, "start master, ts1, ts2, ts3, and status is ok") common.print_debug_msg(1, "create test_table001 and test_table002(kv)") cmd = "./teracli createbyfile testcase/data/create_table_schema" common.exe_and_check_res(cmd) cmd = "./teracli create 'table_test002 <storage=flash, splitsize=2048, mergesize=128>'" common.exe_and_check_res(cmd)
def setUp(): """ set env """ cmd = "./teracli create 'model_table{lg0{cf0}}'" common.exe_and_check_res(cmd) global table try: client = Client("", "pysdk") table = client.OpenTable("model_table") except TeraSdkException as e: print(e.reason) nose.tools.assert_true(False)
def test_create_table(): """ create method """ common.print_debug_msg( 2, "create table_test001 and create table_test002(kv), write and check") cmd = "./teracli createbyfile testcase/data/create_table_schema" common.exe_and_check_res(cmd) cmd = './teracli create "table_test002 <storage=flash, splitsize=2048, mergesize=128>"' common.exe_and_check_res(cmd)
def tearDown(): cmd = "./teracli disable filter_table" common.exe_and_check_res(cmd) cmd = "./teracli drop filter_table" common.exe_and_check_res(cmd)
def setUp(): cmd = "./teracli create 'filter_table{lg0{cf0,cf1}}'" common.exe_and_check_res(cmd)
def test_show_table(): """ show method """ common.print_debug_msg(3, "show and show(x) table") cmd = "./teracli show" common.exe_and_check_res(cmd) cmd = "./teracli showx" common.exe_and_check_res(cmd) cmd = "./teracli show table_test001" common.exe_and_check_res(cmd) cmd = "./teracli show table_test002" common.exe_and_check_res(cmd) cmd = "./teracli showx table_test001" common.exe_and_check_res(cmd) cmd = "./teracli showx table_test002" common.exe_and_check_res(cmd) cmd = "./teracli showschema table_test001" common.exe_and_check_res(cmd) cmd = "./teracli showschema table_test002" common.exe_and_check_res(cmd) cmd = "./teracli showschemax table_test001" common.exe_and_check_res(cmd) cmd = "./teracli showschemax table_test002" common.exe_and_check_res(cmd)
def tearDown(): cmd = "./teracli disable shared_table" common.exe_and_check_res(cmd) cmd = "./teracli drop shared_table" common.exe_and_check_res(cmd)