Try to re-enable XOAuth2 integration tests

This commit is contained in:
Bojan Čekrlić 2020-11-22 21:15:06 +01:00
parent c1985b17c1
commit 2e790097cc
2 changed files with 16 additions and 4 deletions

View file

@ -20,6 +20,21 @@ jobs:
uses: crazy-max/ghaction-docker-buildx@v1 uses: crazy-max/ghaction-docker-buildx@v1
with: with:
buildx-version: latest buildx-version: latest
- name: Prepare .env for xoatuh2 integration tests
shell: bash
env: # Or as an environment variable
XOAUTH2_RELAYHOST_USERNAME: ${{ secrets.XOAUTH2_RELAYHOST_USERNAME }}
XOAUTH2_CLIENT_ID: ${{ XOAUTH2_CLIENT_ID }}
XOAUTH2_SECRET: ${{ XOAUTH2_SECRET }}
XOAUTH2_INITIAL_REFRESH_TOKEN: ${{ XOAUTH2_INITIAL_REFRESH_TOKEN }}
run:
echo "RELAYHOST_USERNAME=${XOAUTH2_RELAYHOST_USERNAME}" > integration-tests/xoauth2/.env
echo "FROM=${XOAUTH2_RELAYHOST_USERNAME}" >> integration-tests/xoauth2/.env
echo "TO=${XOAUTH2_RELAYHOST_USERNAME}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_CLIENT_ID=${XOAUTH2_CLIENT_ID}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_SECRET=${XOAUTH2_SECRET}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_INITIAL_REFRESH_TOKEN=${XOAUTH2_INITIAL_REFRESH_TOKEN}" >> integration-tests/xoauth2/.env
cp integration-tests/xoauth2/.env integration-tests/xoauth2-error/.env
- name: Run integration tests - name: Run integration tests
run: ./integration-tests.sh run: ./integration-tests.sh
- name: Run HELM chart tests - name: Run HELM chart tests
@ -30,4 +45,3 @@ jobs:
DOCKER_PASSWORD: '${{ secrets.DOCKER_ACCESS_TOKEN }}' DOCKER_PASSWORD: '${{ secrets.DOCKER_ACCESS_TOKEN }}'
PLATFORMS: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le" PLATFORMS: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le"
run: ./build.sh -t boky/postfix --push run: ./build.sh -t boky/postfix --push

View file

@ -28,9 +28,7 @@ if [[ $# -gt 0 ]]; then
shift shift
done done
else else
# Disable xoauth2 integration tests as they an access and refresh token. And these expire for i in `find -maxdepth 1 -type d | grep -Ev "^./(tester)" | sort`; do
# after a certain time, so we cannot rely on tests working all the time.
for i in `find -maxdepth 1 -type d | grep -Ev "^./(xoauth2|tester)" | sort`; do
i="$(basename "$i")" i="$(basename "$i")"
if [ "$i" == "." ] || [ "$i" == ".." ]; then if [ "$i" == "." ] || [ "$i" == ".." ]; then
continue continue