crowdsec/test/bin/remove-all-hub-items
Manuel Sabban 1378e16578
fix test 01_cscli by avoiding discrepancies in cscli explain (#3059)
* fix hub installed items in pacakge tests
2024-06-06 11:19:05 +02:00

20 lines
398 B
Bash
Executable file

#!/usr/bin/env bash
set -eu
# shellcheck disable=SC1007
THIS_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
# shellcheck disable=SC1091
. "${THIS_DIR}/../.environment.sh"
# pre-download everything but don't install anything
echo "Pre-downloading Hub content..."
types=$("$CSCLI" hub types -o raw)
for itemtype in $types; do
"$CSCLI" "$itemtype" remove --all --force
done
echo " done."