@@ -61,35 +61,27 @@ jobs:
6161 cache : " poetry"
6262
6363 - name : Install e2e test dependencies
64- run : poetry install --no-root
6564 working-directory : e2e
66-
67- - name : Install oathtool
68- run : sudo apt-get update && sudo apt-get install -y oathtool
65+ run : poetry install --no-root
6966
7067 - name : Get Apigee access token
68+ working-directory : e2e
7169 env :
7270 APIGEE_PASSWORD : ${{ secrets.APIGEE_PASSWORD }}
7371 APIGEE_BASIC_AUTH_TOKEN : ${{ secrets.APIGEE_BASIC_AUTH_TOKEN }}
7472 APIGEE_OTP_KEY : ${{ secrets.APIGEE_OTP_KEY }}
7573 run : |
76- CODE=$(oathtool --totp -b "$APIGEE_OTP_KEY")
74+ CODE=$(poetry run python utils/compute_totp_code.py "$APIGEE_OTP_KEY")
7775 echo "::add-mask::$CODE"
76+
7877 echo "Requesting access token from Apigee..."
7978 response=$(curl -s -X POST "https://login.apigee.com/oauth/token" \
8079 -H "Content-Type: application/x-www-form-urlencoded" \
8180 -H "Accept: application/json;charset=utf-8" \
8281 -H "Authorization: Basic $APIGEE_BASIC_AUTH_TOKEN" \
8382 -d "username=$APIGEE_USERNAME&password=$APIGEE_PASSWORD&mfa_token=$CODE&grant_type=password")
8483
85- # TODO - REMOVE
86- echo "$response"
87-
88- token=$(echo "$response" | jq -e -r '.access_token')
89- if [[ -z "$token" ]]; then
90- echo "Failed to retrieve access token"
91- exit 1
92- fi
84+ token=$(jq -e -r '.access_token' <<<"$response")
9385 echo "::add-mask::$token"
9486 echo "APIGEE_ACCESS_TOKEN=$token" >> $GITHUB_ENV
9587
9890 run : |
9991 export PROXY_NAME=immunisation-fhir-api-internal-dev
10092 export SERVICE_BASE_PATH=immunisation-fhir-api/FHIR/R4
93+
94+ export IMMS_DELTA_TABLE_NAME=imms-internal-dev-delta
95+ export AWS_DOMAIN_NAME=internal-dev.imms.dev.vds.platform.nhs.uk
96+ export DYNAMODB_TABLE_NAME=imms-internal-dev-imms-events
97+ export AWS_SQS_QUEUE_NAME=imms-internal-dev-delta-dlq
98+ export AWS_SNS_TOPIC_NAME=imms-internal-dev-delta-sns
99+
101100 make run-immunization
0 commit comments