---
platform: linux
image_resource:
  type: docker-image
  source:
    repository: ghcr.io/alphagov/paas/cf-acceptance-tests
    tag: 5adc49952d6b25505dc443ceff18975ad6d5165b

inputs:
  - name: paas-cf
  - name: cf-smoke-tests-release
  - name: test-config
outputs:
  - name: artifacts
run:
  path: sh
  args:
  - -c
  - |
    paas-cf/platform-tests/upstream/run_smoke_tests.sh
    TEST_EXIT_CODE=$?
    if [ "$EMAIL_ON_SMOKE_TEST_FAILURE" = "true" ]; then
      if [ "$TEST_EXIT_CODE" -gt 0 ]; then
        paas-cf/concourse/scripts/smoke_tests_email.sh \
          "${DEPLOY_ENV}" "${SYSTEM_DNS_ZONE_NAME}" "${ALERT_EMAIL_ADDRESS}" "${MONITORED_DEPLOY_ENV}"
      fi
    fi
    exit $TEST_EXIT_CODE

---
platform: linux
image_resource:
  type: docker-image
  source:
    repository: ghcr.io/alphagov/paas/cf-acceptance-tests
    tag: 5adc49952d6b25505dc443ceff18975ad6d5165b

inputs:
  - name: paas-cf
  - name: cf-smoke-tests-release
  - name: test-config
outputs:
  - name: artifacts
run:
  path: sh
  args:
  - -c
  - |
    export GO111MODULE="off"
    paas-cf/platform-tests/upstream/run_smoke_tests.sh
    TEST_EXIT_CODE=$?
    if [ "$EMAIL_ON_SMOKE_TEST_FAILURE" = "true" ]; then
      if [ "$TEST_EXIT_CODE" -gt 0 ]; then
        paas-cf/concourse/scripts/smoke_tests_email.sh \
          "${DEPLOY_ENV}" "${SYSTEM_DNS_ZONE_NAME}" "${ALERT_EMAIL_ADDRESS}" "${MONITORED_DEPLOY_ENV}"
      fi
    fi
    exit $TEST_EXIT_CODE

Disable use of Go modules for smoke tests
Disable use of Go modules for smoke tests

Since Go was updated to 1.17 (and the way go install works has changed), smoke
tests have been failing as they are unable to fetch all the sources. This fix
uses GOPATH mode to install the packages.

original author: @cadmiumcat
