From 28fe03b861a409203e28df00e06a0e484e69f02a Mon Sep 17 00:00:00 2001 From: realaravinth Date: Thu, 23 Jun 2022 23:52:04 +0530 Subject: [PATCH] fix: run wget in quiet mode and adapt MAILDEV_URL based on environment --- .woodpecker.yml | 3 ++- integration/tests.sh | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 8d56567..59cafbd 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,7 +3,7 @@ pipeline: image: python environment: - DATABSE_URL=postgres://postgres:password@database:5432/postgres - - EMAIL_URL=smtp://admin:password@localhost:10025 + - EMAIL_URL=smtp://admin:password@smtp:10025 commands: - pip install virtualenv - make env @@ -31,5 +31,6 @@ services: container_name: hostea-dash-maildev environment: - MAILDEV_SMTP_PORT=10025 + - MAILDEV_WEB_PORT=1080 - MAILDEV_INCOMING_USER=admin - MAILDEV_INCOMING_PASS=password diff --git a/integration/tests.sh b/integration/tests.sh index 16c75a9..069a98b 100755 --- a/integration/tests.sh +++ b/integration/tests.sh @@ -7,7 +7,8 @@ readonly SERVER_PID_FILE=./tmp/gitea.pid readonly DASHBOARD_URL="http://localhost:8000" readonly GITEA_URL="http://localhost:3000" -readonly MAILDEV_URL="http://localhost:1080" + + readonly DASHBOARD_OIDC_DISCOVERY_URL="$DASHBOARD_URL/o/.well-known/openid-configuration/" readonly DASHBOARD_ADMIN_USERNAME=root @@ -30,6 +31,14 @@ readonly HOSTEA_CUSTOMER_USERNAME=batman readonly HOSTEA_CUSTOMER_PASSWORD=supercomplicatedpassword readonly HOSTEA_CUSTOMER_EMAIL="$HOSTEA_CUSTOMER_USERNAME@example.org" + +if [ -z ${CI+x} ]; +then + MAILDEV_URL="http://localhost:1080" +else + MAILDEV_URL="http://smtp:1080" +fi + OIDC_CLIENT_ID="" OIDC_CLIENT_SECRET="" @@ -138,7 +147,7 @@ gitea(){ if [ ! -e $BIN ]; then - wget --output-document=$BIN $SOURCE + wget --quiet --output-document=$BIN $SOURCE chmod +x $BIN fi