abra/tests/integration/core.sh

102 lines
3.5 KiB
Bash
Raw Normal View History

2022-01-01 20:36:00 +00:00
#!/bin/bash
2022-01-02 13:05:02 +00:00
# the goal of this script is to ensure basic core functionality is working
# before we make new releases. we try to make a balance between manual testing
# and automated testing, i.e. we don't invest too much time in a fragile
# automation that costs us more time to maintain and instead just do the test
# manually (see `../manual/manual.md` for more). it is a balance which we
# figure out together.
2022-01-02 13:05:02 +00:00
set -ex
2022-01-01 20:36:00 +00:00
ABRA="$HOME/.local/bin/abra -d"
INSTALLER_URL="https://install.abra.coopcloud.tech"
for arg in "$@"; do
if [ "$arg" == "--dev" ]; then
ABRA="/src/abra -d"
INSTALLER_URL="https://git.coopcloud.tech/coop-cloud/abra/raw/branch/main/scripts/installer/installer"
fi
done
export PATH=$PATH:$HOME/.local/bin
# ========================================================================
# choosing abra executable for test run
# ========================================================================
2022-01-01 20:36:00 +00:00
echo "choosing $ABRA as abra executable"
echo "choosing $INSTALLER_URL as abra installer url"
# ========================================================================
# latest stable release
# ========================================================================
2022-01-01 20:36:00 +00:00
wget -O- https://install.abra.autonomic.zone | bash
~/.local/bin/abra -v
# ========================================================================
# latest rc release
# ========================================================================
2022-01-01 20:36:00 +00:00
wget -O- https://install.abra.autonomic.zone | bash -s -- --rc
~/.local/bin/abra -v
# ========================================================================
# upgrade to stable in-place
# ========================================================================
2022-01-01 20:36:00 +00:00
$ABRA upgrade
~/.local/bin/abra -v
# ========================================================================
# upgrade to rc in-place
# ========================================================================
2022-01-01 20:36:00 +00:00
$ABRA upgrade --rc
~/.local/bin/abra -v
# ========================================================================
# autocomplete
# ========================================================================
2022-01-01 20:36:00 +00:00
$ABRA autocomplete bash
$ABRA autocomplete fizsh
$ABRA autocomplete zsh
# ========================================================================
# record command
# ========================================================================
2022-01-02 19:18:37 +00:00
$ABRA record new -p gandi -t A -n int-core -v 192.157.2.21 coopcloud.tech
$ABRA record list -p gandi coopcloud.tech | grep -q int-core
$ABRA -n record rm -p gandi -t A -n int-core coopcloud.tech
2022-01-01 20:36:00 +00:00
# ========================================================================
# catalogue command
# ========================================================================
$ABRA catalogue generate
$ABRA catalogue generate -s gitea
# ========================================================================
# recipe command
# ========================================================================
$ABRA recipe new testrecipe
$ABRA recipe list
$ABRA recipe list -p cloud
$ABRA recipe versions peertube
$ABRA recipe lint gitea
# ========================================================================
# server command
# ========================================================================
2022-01-02 19:18:37 +00:00
$ABRA -n server new -p hetzner-cloud --hn int-core
2022-01-02 19:18:37 +00:00
$ABRA server ls | grep -q int-core
2022-01-02 13:05:02 +00:00
2022-01-02 19:18:37 +00:00
$ABRA -n server rm -s -p hetzner-cloud --hn int-core
2022-01-02 13:05:02 +00:00
# ========================================================================
# app command
# ========================================================================
$ABRA app ls
$ABRA app ls -S