mirror of
https://github.com/bisq-network/bisq.git
synced 2025-03-03 10:46:54 +01:00
Replace hardcoded version with Version.java value
Bats version check tests now use a bash script for parsing the value from the Bisq class file, and these test cases no longer need to be manually updated.
This commit is contained in:
parent
e3b3c625b3
commit
9132722bbf
2 changed files with 11 additions and 2 deletions
|
@ -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\"" {
|
||||
|
|
5
apitest/scripts/version-parser.bash
Executable file
5
apitest/scripts/version-parser.bash
Executable file
|
@ -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')
|
Loading…
Add table
Reference in a new issue