Skip to content

Commit 7220ff9

Browse files
committed
Update test to pass traffic to handle new conf
Now that we are using localhost as an upstream we need to make sure that the test to pass traffic checks for the correct headers based on the new config.
1 parent afeb35e commit 7220ff9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/github-action-test-nginxaas-deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: "Update config - single file"
3434
shell: bash
3535
run: |
36-
sed -i 's/000000/'"$GITHUB_RUN_NUMBER"'/g' github-action/test/configs/single/nginx.conf
36+
sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' github-action/test/configs/single/nginx.conf
3737
cat github-action/test/configs/single/nginx.conf
3838
- name: "Sync NGINX configuration to NGINXaaS for Azure - single file"
3939
uses: nginxinc/[email protected]
@@ -47,7 +47,7 @@ jobs:
4747
- name: "Validate config update - single file"
4848
shell: bash
4949
run: |
50-
wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_NUMBER"'")'
50+
wget -S -q --spider http://${{ secrets.NGINX_DEPLOYMENT_IP }} 2>&1 | grep "Github-Run-Id: $GITHUB_RUN_ID"
5151
- name: "Update config - multi file"
5252
shell: bash
5353
run: |
@@ -70,12 +70,12 @@ jobs:
7070
- name: "Validate config update"
7171
shell: bash
7272
run: |
73-
wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_ID"'")'
73+
wget -S -q --spider http://${{ secrets.NGINX_DEPLOYMENT_IP }} 2>&1 | grep "Github-Run-Id: $GITHUB_RUN_ID"
7474
- name: "Validate certificate update"
7575
uses: azure/CLI@v1
7676
with:
7777
inlineScript: |
7878
echo "-----BEGIN CERTIFICATE-----" > /tmp/$GITHUB_RUN_ID.tmp
7979
az keyvault certificate show --vault-name $NGINX_VAULT_NAME -n $NGINX_CERT_NAME | jq -r .cer | cat >> /tmp/$GITHUB_RUN_ID.tmp
8080
echo "-----END CERTIFICATE-----" >> /tmp/$GITHUB_RUN_ID.tmp
81-
wget -O - -o /dev/null https://${{ secrets.NGINX_DEPLOYMENT_IP }} --ca-certificate=/tmp/$GITHUB_RUN_ID.tmp | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_ID"'")'
81+
wget -S -q --spider https://${{ secrets.NGINX_DEPLOYMENT_IP }} --ca-certificate=/tmp/$GITHUB_RUN_ID.tmp 2>&1 | grep "Github-Run-Id: $GITHUB_RUN_ID"

0 commit comments

Comments
 (0)