feat(fabric test):
add fabric test case "TxQueryFail_args_ADD1"
@@ -727,6 +727,35 @@ START_TEST(test_002Transaction_0028TxQueryFail_arg2_NULL)
}
END_TEST
+START_TEST(test_002Transaction_0029TxQueryFail_args_ADD1)
+{
+ BSINT32 rtnVal;
+ BoatHlfabricTx tx_ptr;
+ BoatHlfabricWallet *g_fabric_wallet_ptr = NULL;
+ BoatHlfabricWalletConfig wallet_config = get_fabric_wallet_settings();
+ BoatIotSdkInit();
+ /* 1. execute unit test */
+ rtnVal = BoatWalletCreate(BOAT_PROTOCOL_HLFABRIC, NULL, &wallet_config, sizeof(BoatHlfabricWalletConfig));
+ g_fabric_wallet_ptr = BoatGetWalletByIndex(rtnVal);
+
+ rtnVal = BoatHlfabricTxInit(&tx_ptr, g_fabric_wallet_ptr, NULL, "mycc", NULL, "mychannel", "Org1MSP");
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricWalletSetNetworkInfo(tx_ptr.wallet_ptr, wallet_config.nodesCfg);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ long int timesec = 0;
+ time(&timesec);
+ rtnVal = BoatHlfabricTxSetTimestamp(&tx_ptr, timesec, 0);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricTxSetArgs(&tx_ptr, "query", "a","b", NULL);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricTxSubmit(&tx_ptr);
+ ck_assert_int_eq(rtnVal, BOAT_ERROR);
+ BoatHlfabricTxDeInit(&tx_ptr);
+ BoatIotSdkDeInit();
+ fabricWalletConfigFree(wallet_config);
+}
+END_TEST
+
Suite *make_transaction_suite(void)
{
@@ -767,6 +796,7 @@ Suite *make_transaction_suite(void)
tcase_add_test(tc_transaction_api, test_002Transaction_0026TxQueryFail_Method_ERR);
tcase_add_test(tc_transaction_api, test_002Transaction_0027TxQueryFail_arg2_ERR);
tcase_add_test(tc_transaction_api, test_002Transaction_0028TxQueryFail_arg2_NULL);
+ tcase_add_test(tc_transaction_api, test_002Transaction_0029TxQueryFail_args_ADD1);
return s_transaction;
}
