-
Notifications
You must be signed in to change notification settings - Fork 995
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ci test config min/max client verion (#3882)
- Loading branch information
1 parent
7255da5
commit 7d660d9
Showing
3 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash -e | ||
source .github/scripts/common/common.sh | ||
|
||
[[ -z "$META" ]] && META=sqlite3 | ||
source .github/scripts/start_meta_engine.sh | ||
start_meta_engine $META | ||
META_URL=$(get_meta_url $META) | ||
|
||
download_juicefs_client(){ | ||
version=$1 | ||
wget -q https://github.com/juicedata/juicefs/releases/download/v$version/juicefs-$version-linux-amd64.tar.gz | ||
tar -xzf juicefs-$version-linux-amd64.tar.gz -C /tmp/ | ||
sudo cp /tmp/juicefs juicefs-$version | ||
./juicefs-$version version | ||
} | ||
|
||
test_config_min_client_version() | ||
{ | ||
prepare_test | ||
download_juicefs_client 1.0.0 | ||
./juicefs format $META_URL myjfs | ||
./juicefs-1.0.0 mount $META_URL /jfs -d && exit 1 || true | ||
./juicefs config $META_URL --min-client-version 1.0.1 | ||
./juicefs-1.0.0 mount $META_URL /jfs -d && exit 1 || true | ||
./juicefs config $META_URL --min-client-version 1.0.0 | ||
./juicefs-1.0.0 mount $META_URL /jfs -d | ||
} | ||
|
||
test_config_max_client_version() | ||
{ | ||
prepare_test | ||
current_version=$(./juicefs version | awk '{print $3}') | ||
download_juicefs_client 1.0.0 | ||
./juicefs-1.0.0 format $META_URL myjfs | ||
./juicefs-1.0.0 config $META_URL --max-client-version 1.0.1 | ||
./juicefs mount $META_URL /jfs -d && exit 1 || true | ||
./juicefs config $META_URL --max-client-version $current_version | ||
./juicefs mount $META_URL /jfs -d | ||
} | ||
|
||
|
||
source .github/scripts/common/run_test.sh && run_test $@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters