Skip to content

Commit

Permalink
Use random routes in test apps
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmaen committed Sep 12, 2024
1 parent 6258800 commit a9a8885
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/test-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
cf8 --version
- name: Build Java apps
run: ./http2/gradlew clean build -p http2
- name: Remove routes from manifest
run: yq 'del(.applications[].routes)' -i "${GITHUB_WORKSPACE}/http2/apps-manifest.yml"
- name: Logging into target CloudFoundry
run: cf8 login -a "${{ secrets.CF_API }}" -u "${{ secrets.CF_USERNAME }}" -p "${{ secrets.CF_PASSWORD }}" -o "${{ secrets.CF_ORG }}" -s "${{ secrets.CF_SPACE }}" --origin uaa
- name: Deploy CloudFoundry sample apps
Expand All @@ -64,15 +66,27 @@ jobs:
run: |
echo "### Testing HTTP2_APP app ###"
yq e '.applications.[].name' "${GITHUB_WORKSPACE}/http2/apps-manifest.yml" | grep -i 'http2' | while read -r HTTP2_APP; do
echo "curl -v --http2-prior-knowledge -H 'Connection: close' 'https://$HTTP2_APP.${{ secrets.CF_DOMAIN }}'"
curl -v --http2-prior-knowledge -H "Connection: close" "https://$HTTP2_APP.${{ secrets.CF_DOMAIN }}"
ROUTE=${{ github.run_id }}-$HTTP2_APP
cf8 map-route $HTTP2_APP ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
echo "curl -v --http2-prior-knowledge -H 'Connection: close' 'https://$ROUTE.${{ secrets.CF_DOMAIN }}'"
curl -v --http2-prior-knowledge -H "Connection: close" "https://$ROUTE.${{ secrets.CF_DOMAIN }}"
done
echo "Testing GRPC apps"
grpcurl go-grpc-test.${{ secrets.CF_DOMAIN }}:443 example.Example.Run
grpcurl -proto http2/java-grpc/app/src/main/proto/example.proto java-grpc-test.${{ secrets.CF_DOMAIN }}:443 example.Example.Run
grpcurl -proto http2/node-grpc/example.proto node-grpc-test.${{ secrets.CF_DOMAIN }}:443 Example.Run
grpcurl -proto http2/python-grpc/example.proto python-grpc-test.${{ secrets.CF_DOMAIN }}:443 Example.Run
grpcurl -proto http2/ruby-grpc/example.proto ruby-grpc-test.${{ secrets.CF_DOMAIN }}:443 Example.Run
ROUTE=${{ github.run_id }}-go-grpc-test
cf8 map-route go-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
grpcurl $ROUTE.${{ secrets.CF_DOMAIN }}:443 example.Example.Run
ROUTE=${{ github.run_id }}-java-grpc-test
cf8 map-route java-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
grpcurl -proto http2/java-grpc/app/src/main/proto/example.proto $ROUTE.${{ secrets.CF_DOMAIN }}:443 example.Example.Run
ROUTE=${{ github.run_id }}-node-grpc-test
cf8 map-route node-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
grpcurl -proto http2/node-grpc/example.proto $ROUTE.${{ secrets.CF_DOMAIN }}:443 Example.Run
ROUTE=${{ github.run_id }}-python-grpc-test
cf8 map-route python-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
grpcurl -proto http2/python-grpc/example.proto $ROUTE.${{ secrets.CF_DOMAIN }}:443 Example.Run
ROUTE=${{ github.run_id }}-ruby-grpc-test
cf8 map-route ruby-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2
grpcurl -proto http2/ruby-grpc/example.proto $ROUTE.${{ secrets.CF_DOMAIN }}:443 Example.Run
- name: Clean-up
if: success() || failure()
run: |
Expand Down

0 comments on commit a9a8885

Please sign in to comment.