Skip to content
Prev Previous commit
Next Next commit
Fix URLs in base url integration test
  • Loading branch information
joshmgross committed Nov 16, 2023
commit 8df72cd04ec2fbbf929bb78ad7d2f71b03c0ad95
16 changes: 8 additions & 8 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ jobs:
name: base-url set
uses: ./
with:
base-url: https://my.github-enterprise-server.com/api/v3
base-url: https://my.github-enterprise-server.com/api/v3/
script: |
const endpoint = github.request.endpoint
return endpoint({}).url
Expand All @@ -276,26 +276,26 @@ jobs:
name: base-url does not override GITHUB_API_URL when not set
uses: ./
env:
GITHUB_API_URL: https://my.github-enterprise-server.com/api/v3
GITHUB_API_URL: https://my.github-enterprise-server.com/api/v3/
with:
script: |
const endpoint = github.request.endpoint
return endpoint({}).url
result-encoding: string
- run: |
echo "- Validating base-url default"
expected="https://api.github.com"
expected="https://api.github.com/"
if [[ "${{steps.base-url-default.outputs.result}}" != "$expected" ]]; then
echo $'::error::\u274C' "Expected base-url to start with '$expected', got ${{steps.base-url-default.outputs.result}}"
echo $'::error::\u274C' "Expected base-url to equal '$expected', got ${{steps.base-url-default.outputs.result}}"
exit 1
fi
echo "- Validating base-url set to a value"
expected="https://my.github-enterprise-server.com/api/v3"
expected="https://my.github-enterprise-server.com/api/v3/"
if [[ "${{steps.base-url-set.outputs.result}}" != "$expected" ]]; then
echo $'::error::\u274C' "Expected base-url to start with '$expected', got ${{steps.base-url-set.outputs.result}}"
echo $'::error::\u274C' "Expected base-url to equal '$expected', got ${{steps.base-url-set.outputs.result}}"
exit 1
fi
echo "- Validating base-url not set respects GITHUB_API_URL"
expected="https://my.github-enterprise-server.com/api/v3"
expected="https://my.github-enterprise-server.com/api/v3/"
if [[ "${{steps.base-url-env.outputs.result}}" != "$expected" ]]; then
echo $'::error::\u274C' "Expected base-url to start with '$expected', got ${{steps.base-url-env.outputs.result}}"
echo $'::error::\u274C' "Expected base-url to equal '$expected', got ${{steps.base-url-env.outputs.result}}"