tests WIP

This commit is contained in:
Stephen Kirby
2023-09-29 16:31:32 +00:00
parent aa849bc42e
commit 1efd11f651
2 changed files with 38 additions and 5 deletions

View File

@@ -3,14 +3,16 @@
# Automatically authenticate the user if they are not
# logged in to another deployment
echo "Logging into Coder..."
CODER_DEPLOYMENT_URL=("${CODER_DEPLOYMENT_URL}")
CODER_USER_TOKEN=("${CODER_USER_TOKEN}")
RESET='\033[0m'
BOLD='\033[0;1m'
printf "$${BOLD}Logging into Coder...\n\n$${RESET}"
echo "SESSION TOKEN : ${CODER_USER_TOKEN}"
echo "DEPLOYMENT URL: ${CODER_DEPLOYMENT_URL}"
echo ""
if ! coder list >/dev/null 2>&1; then
set +x; coder login --token="${CODER_USER_TOKEN}" --url="${CODER_DEPLOYMENT_URL}"
else
echo "You are already authenticated with coder"
echo "You are already authenticated with coder."
fi