forked from toolshed/abra
refactor: refocus the script purpose
This commit is contained in:
136
tests/integration/core.sh
Executable file
136
tests/integration/core.sh
Executable file
@ -0,0 +1,136 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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. it is a balance which we figure out together.
|
||||
|
||||
set -ex
|
||||
|
||||
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
|
||||
# ========================================================================
|
||||
echo "choosing $ABRA as abra executable"
|
||||
echo "choosing $INSTALLER_URL as abra installer url"
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# ========================================================================
|
||||
# latest stable release
|
||||
# ========================================================================
|
||||
wget -O- https://install.abra.autonomic.zone | bash
|
||||
~/.local/bin/abra -v
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# ========================================================================
|
||||
# latest rc release
|
||||
# ========================================================================
|
||||
wget -O- https://install.abra.autonomic.zone | bash -s -- --rc
|
||||
~/.local/bin/abra -v
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# ========================================================================
|
||||
# upgrade to stable in-place
|
||||
# ========================================================================
|
||||
$ABRA upgrade
|
||||
~/.local/bin/abra -v
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# ========================================================================
|
||||
# upgrade to rc in-place
|
||||
# ========================================================================
|
||||
$ABRA upgrade --rc
|
||||
~/.local/bin/abra -v
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# ========================================================================
|
||||
# autocomplete
|
||||
# ========================================================================
|
||||
$ABRA autocomplete bash
|
||||
$ABRA autocomplete fizsh
|
||||
$ABRA autocomplete zsh
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# ========================================================================
|
||||
# record command
|
||||
# ========================================================================
|
||||
$ABRA record new -p gandi -t A -n e2e -v 192.157.2.21 coopcloud.tech
|
||||
$ABRA record list -p gandi coopcloud.tech | grep -q e2e
|
||||
$ABRA -n record rm -p gandi -t A -n e2e coopcloud.tech
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# ========================================================================
|
||||
# catalogue command
|
||||
# ========================================================================
|
||||
$ABRA catalogue generate
|
||||
$ABRA catalogue generate -s gitea
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# ========================================================================
|
||||
# recipe command
|
||||
# ========================================================================
|
||||
$ABRA recipe new testrecipe
|
||||
ls ~/.abra/apps/testrecipe
|
||||
cat ~/.abra/apps/testrecipe/README.md
|
||||
|
||||
$ABRA recipe list
|
||||
$ABRA recipe list -p cloud
|
||||
|
||||
$ABRA recipe versions peertube
|
||||
|
||||
$ABRA recipe lint gitea
|
||||
|
||||
# echo ""
|
||||
# echo ""
|
||||
|
||||
# ========================================================================
|
||||
# server command
|
||||
# ========================================================================
|
||||
$ABRA -n server new -p hetzner-cloud --hn e2e
|
||||
|
||||
# TODO: add --no-domain-check to server add
|
||||
# TODO: figure out how to pass a password for ssh password auth
|
||||
# TODO: how to deploy traefik daemonless mode?
|
||||
$ABRA server add -p -t e2e root "TODO-PASSWORD"
|
||||
|
||||
$ABRA server ls | grep -q e2e
|
||||
|
||||
$ABRA -n server rm -s -p hetzner-cloud --hn e2e
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# ========================================================================
|
||||
# app command
|
||||
# ========================================================================
|
||||
|
||||
# echo ""
|
||||
# echo ""
|
||||
Reference in New Issue
Block a user