Skip to content

Commit f4226c7

Browse files
author
Nikita Khateev
committed
Add libnullpay tests to the pipeline
Signed-off-by: Nikita Khateev <[email protected]>
1 parent d67a626 commit f4226c7

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

Jenkinsfile.cd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,12 @@ def linuxTesting(file, env_name, network_name, stashBuildResults) {
216216
sh "cp libindy/target/release/libindy.so libnullpay"
217217
dir('libnullpay') {
218218
testEnv.inside("--ip=\"10.0.0.3\" --network=${network_name}") {
219-
echo "${env_name} Indy Libnullpay Test: Build"
220-
sh "LIBRARY_PATH=./ RUST_BACKTRACE=1 cargo build --release"
219+
echo "${env_name} Libindy Test: Build"
220+
sh "LIBRARY_PATH=./ RUST_BACKTRACE=1 cargo test --release --no-run"
221+
222+
echo "${env_name} Libindy Test: Run tests"
223+
sh "LD_LIBRARY_PATH=./ RUST_BACKTRACE=1 RUST_LOG=indy::=debug,zmq=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --release"
224+
221225

222226
if (stashBuildResults) {
223227
stash includes: 'target/release/libnullpay.so', name: 'LibnullpayUbuntuBuildResult'

Jenkinsfile.ci

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,19 @@ def linuxTesting(file, env_name, network_name) {
255255
}
256256
}
257257
},
258+
"${env_name}-libindy-test": {
259+
dir('libnullpay') {
260+
testEnv.inside("--network=${network_name}") {
261+
echo "${env_name} Libnullpay Test: Test"
262+
263+
echo "${env_name} Libnullpay Test: Build Test"
264+
sh "LIBRARY_PATH=./ RUST_BACKTRACE=1 cargo test --no-run"
265+
266+
echo "${env_name} Libnullpay Test: Run tests"
267+
sh "LD_LIBRARY_PATH=./ RUST_BACKTRACE=1 RUST_LOG=indy::=debug,zmq=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test"
268+
}
269+
}
270+
},
258271
"${env_name}-java-test" : { linuxModuleTesting(file, env_name, network_name, this.&linuxJavaTesting) },
259272
"${env_name}-python-test" : { linuxModuleTesting(file, env_name, network_name, this.&linuxPythonTesting) },
260273
"${env_name}-cli-test" : { linuxModuleTesting(file, env_name, network_name, this.&linuxCLITesting) }

cli/libnullpay.so

18.5 MB
Binary file not shown.

libindy/src/api/payments.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,8 @@ pub extern fn indy_add_request_fees(command_handle: i32,
464464
check_useful_c_str!(outputs_json, ErrorCode::CommonInvalidParam6);
465465
check_useful_c_callback!(cb, ErrorCode::CommonInvalidParam7);
466466

467+
trace!("enter add fees api");
468+
467469
let result =
468470
CommandExecutor::instance().send(
469471
Command::Payments(
@@ -477,6 +479,7 @@ pub extern fn indy_add_request_fees(command_handle: i32,
477479
let (err, req_with_fees_json, payment_method) = result_to_err_code_2!(result, String::new(), String::new());
478480
let req_with_fees_json = CStringUtils::string_to_cstring(req_with_fees_json);
479481
let payment_method = CStringUtils::string_to_cstring(payment_method);
482+
trace!("exit add fees api");
480483
cb(command_handle, err, req_with_fees_json.as_ptr(), payment_method.as_ptr());
481484
}))
482485
));

0 commit comments

Comments
 (0)