diff --git a/apitest/scripts/mainnet-test.sh b/apitest/scripts/mainnet-test.sh index bfab9fc3b5..b7b7a8e613 100755 --- a/apitest/scripts/mainnet-test.sh +++ b/apitest/scripts/mainnet-test.sh @@ -16,6 +16,8 @@ # # ./cli/test.sh +# load 'mainnet-test-helper' + @test "test unsupported method error" { run ./bisq-cli --password=xyz bogus [ "$status" -eq 1 ] @@ -45,17 +47,19 @@ } @test "test getversion call with quoted password" { + load 'version-parser' run ./bisq-cli --password="xyz" getversion [ "$status" -eq 0 ] echo "actual output: $output" >&2 - [ "$output" = "1.3.9" ] + [ "$output" = "$CURRENT_VERSION" ] } @test "test getversion" { + load 'version-parser' run ./bisq-cli --password=xyz getversion [ "$status" -eq 0 ] echo "actual output: $output" >&2 - [ "$output" = "1.3.9" ] + [ "$output" = "$CURRENT_VERSION" ] } @test "test setwalletpassword \"a b c\"" { diff --git a/apitest/scripts/version-parser.bash b/apitest/scripts/version-parser.bash new file mode 100755 index 0000000000..ba7f2c2d0f --- /dev/null +++ b/apitest/scripts/version-parser.bash @@ -0,0 +1,5 @@ +#!/bin/bash + +# Bats helper script for parsing current version from Version.java. + +export CURRENT_VERSION=$(grep "String VERSION =" common/src/main/java/bisq/common/app/Version.java | sed 's/[^0-9.]*//g')