mirror of
https://github.com/actions/github-script.git
synced 2026-02-07 19:47:26 +00:00
Fix URLs in base url integration test
This commit is contained in:
parent
4793596d6d
commit
8df72cd04e
1 changed files with 8 additions and 8 deletions
16
.github/workflows/integration.yml
vendored
16
.github/workflows/integration.yml
vendored
|
|
@ -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
|
||||
|
|
@ -276,7 +276,7 @@ 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
|
||||
|
|
@ -284,18 +284,18 @@ jobs:
|
|||
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}}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue