test(conf-test): use major version number as prefix to find old config

This commit is contained in:
Zaiming (Stone) Shi 2023-05-30 09:59:57 +02:00
parent 65506eb15e
commit 74582ad36e
1 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ start_emqx_with_conf() {
"$EMQX_ROOT"/bin/emqx stop "$EMQX_ROOT"/bin/emqx stop
} }
MINOR_VSN=$(./pkg-vsn.sh "$PROFILE" | cut -d. -f1,2) MAJOR_VSN=$(./pkg-vsn.sh "$PROFILE" | cut -d. -f1)
if [ "$PROFILE" = "emqx" ]; then if [ "$PROFILE" = "emqx" ]; then
PREFIX="v" PREFIX="v"
@ -21,7 +21,7 @@ else
PREFIX="e" PREFIX="e"
fi fi
FILES=$(ls ./scripts/conf-test/old-confs/$PREFIX"$MINOR_VSN"*) FILES=$(ls ./scripts/conf-test/old-confs/"${PREFIX}${MAJOR_VSN}"*)
cp "$EMQX_ROOT"/etc/emqx.conf "$EMQX_ROOT"/etc/emqx.conf.bak cp "$EMQX_ROOT"/etc/emqx.conf "$EMQX_ROOT"/etc/emqx.conf.bak
cleanup() { cleanup() {