Perform garage tests on each of the running nodes
This commit is contained in:
parent
8dcc436aaa
commit
96a3ecfe14
@ -1,6 +1,7 @@
|
||||
# shellcheck source=../../utils/with-1-data-1-empty-node-cluster.sh
|
||||
source "$UTILS"/with-1-data-1-empty-node-cluster.sh
|
||||
|
||||
function do_tests {
|
||||
status="$(isle garage cli status | tail -n+3)"
|
||||
|
||||
[ "$(echo "$status" | wc -l)" = "3" ]
|
||||
@ -11,3 +12,10 @@ echo "$status" | grep -q '10.6.9.1:3920'
|
||||
buckets="$(isle garage cli bucket list | tail -n+2)"
|
||||
[ "$(echo "$buckets" | wc -l)" = 1 ]
|
||||
echo "$buckets" | grep -q 'global-shared'
|
||||
}
|
||||
|
||||
as_primus
|
||||
do_tests
|
||||
|
||||
as_secondus
|
||||
do_tests
|
||||
|
@ -1,8 +1,16 @@
|
||||
# shellcheck source=../../utils/with-1-data-1-empty-node-cluster.sh
|
||||
source "$UTILS"/with-1-data-1-empty-node-cluster.sh
|
||||
|
||||
function do_tests {
|
||||
files="$(isle garage mc -- tree --json garage)"
|
||||
[ "$(echo "$files" | jq -s '.|length')" -ge "1" ]
|
||||
|
||||
file="$(echo "$files" | jq -sr '.[0].key')"
|
||||
[ "$(isle garage mc -- cat "garage/$file" | wc -c)" -gt "0" ]
|
||||
}
|
||||
|
||||
as_primus
|
||||
do_tests
|
||||
|
||||
as_secondus
|
||||
do_tests
|
||||
|
@ -8,4 +8,9 @@ XDG_DATA_HOME="$TMPDIR/.data"
|
||||
|
||||
mkdir -p "$TMPDIR" "$XDG_RUNTIME_DIR" "$XDG_DATA_HOME"
|
||||
|
||||
echo "export TMPDIR='$TMPDIR' XDG_RUNTIME_DIR='$XDG_RUNTIME_DIR' XDG_DATA_HOME='$XDG_DATA_HOME'"
|
||||
cat <<EOF
|
||||
export TMPDIR="$TMPDIR"
|
||||
export XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR"
|
||||
export XDG_DATA_HOME="$XDG_DATA_HOME"
|
||||
cd "$TMPDIR"
|
||||
EOF
|
||||
|
@ -4,10 +4,17 @@ base="shared/1-data-1-empty"
|
||||
primus_base="$base/primus"
|
||||
secondus_base="$base/secondus"
|
||||
|
||||
function as_primus {
|
||||
eval "$($SHELL "$UTILS/shared-daemon-env.sh" "$primus_base")"
|
||||
}
|
||||
|
||||
function as_secondus {
|
||||
eval "$($SHELL "$UTILS/shared-daemon-env.sh" "$secondus_base")"
|
||||
}
|
||||
|
||||
# Even if it's already intialized, we want to put the caller in primus'
|
||||
# environment
|
||||
eval "$($SHELL "$UTILS/shared-daemon-env.sh" "$primus_base")"
|
||||
cd "$TMPDIR"
|
||||
as_primus
|
||||
|
||||
secondus_bootstrap="$(pwd)/secondus-bootstrap.yml"
|
||||
|
||||
@ -61,8 +68,7 @@ EOF
|
||||
> "$secondus_bootstrap"
|
||||
|
||||
(
|
||||
eval "$($SHELL "$UTILS/shared-daemon-env.sh" "$secondus_base")"
|
||||
cd "$TMPDIR"
|
||||
as_secondus
|
||||
|
||||
cat >daemon.yml <<EOF
|
||||
vpn:
|
||||
|
Loading…
Reference in New Issue
Block a user