Skip to content

Commit

Permalink
Try to re-enable XOAuth2 integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bokysan committed Nov 22, 2020
1 parent c1985b1 commit 2e79009
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ jobs:
uses: crazy-max/ghaction-docker-buildx@v1
with:
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
run: ./integration-tests.sh
- name: Run HELM chart tests
Expand All @@ -30,4 +45,3 @@ jobs:
DOCKER_PASSWORD: '${{ secrets.DOCKER_ACCESS_TOKEN }}'
PLATFORMS: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le"
run: ./build.sh -t boky/postfix --push

4 changes: 1 addition & 3 deletions integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ if [[ $# -gt 0 ]]; then
shift
done
else
# Disable xoauth2 integration tests as they an access and refresh token. And these expire
# 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
for i in `find -maxdepth 1 -type d | grep -Ev "^./(tester)" | sort`; do
i="$(basename "$i")"
if [ "$i" == "." ] || [ "$i" == ".." ]; then
continue
Expand Down

0 comments on commit 2e79009

Please sign in to comment.