BREAKING CHANGE: Custom proxy handling has been removed. If you use HTTP_PROXY or HTTPS_PROXY, you must now also set NODE_USE_ENV_PROXY=1 on the action step.
405 lines
11 KiB
Markdown
405 lines
11 KiB
Markdown
# Snapshot report for `tests/index.js`
|
|
|
|
The actual snapshot is saved in `index.js.snap`.
|
|
|
|
Generated by [AVA](https://avajs.dev).
|
|
|
|
## action-deprecated-inputs.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
''
|
|
|
|
## main-custom-github-api-url.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
␊
|
|
- actions/create-github-app-token␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /api/v3/repos/actions/create-github-app-token/installation␊
|
|
POST /api/v3/app/installations/123456/access_tokens␊
|
|
{"repositories":["create-github-app-token"]}`
|
|
|
|
## main-missing-owner.test.js
|
|
|
|
> stderr
|
|
|
|
'GITHUB_REPOSITORY_OWNER missing, must be set to \'<owner>\''
|
|
|
|
> stdout
|
|
|
|
''
|
|
|
|
## main-missing-repository.test.js
|
|
|
|
> stderr
|
|
|
|
'GITHUB_REPOSITORY missing, must be set to \'<owner>/<repo>\''
|
|
|
|
> stdout
|
|
|
|
''
|
|
|
|
## main-private-key-with-escaped-newlines.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
`Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /repos/actions/create-github-app-token/installation␊
|
|
POST /app/installations/123456/access_tokens␊
|
|
{"repositories":["create-github-app-token"]}`
|
|
|
|
## main-proxy-requires-native-support.test.js
|
|
|
|
> stderr
|
|
|
|
'A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.'
|
|
|
|
> stdout
|
|
|
|
'::error::A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.'
|
|
|
|
## main-repo-skew.test.js
|
|
|
|
> stderr
|
|
|
|
`'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued.␊
|
|
[@octokit/auth-app] GitHub API time and system time are different by 30 seconds. Retrying request with the difference accounted for.`
|
|
|
|
> stdout
|
|
|
|
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
␊
|
|
- actions/failed-repo␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /repos/actions/failed-repo/installation␊
|
|
GET /repos/actions/failed-repo/installation␊
|
|
POST /app/installations/123456/access_tokens␊
|
|
{"repositories":["failed-repo"]}`
|
|
|
|
## main-token-get-owner-set-fail-response.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
`Input 'repositories' is not set. Creating token for all repositories owned by smockle.␊
|
|
Failed to create token for "smockle" (attempt 1): GitHub API not available␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /users/smockle/installation␊
|
|
GET /users/smockle/installation␊
|
|
POST /app/installations/123456/access_tokens␊
|
|
null`
|
|
|
|
## main-token-get-owner-set-repo-fail-response.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
␊
|
|
- actions/failed-repo␊
|
|
Failed to create token for "failed-repo" (attempt 1): GitHub API not available␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /repos/actions/failed-repo/installation␊
|
|
GET /repos/actions/failed-repo/installation␊
|
|
POST /app/installations/123456/access_tokens␊
|
|
{"repositories":["failed-repo"]}`
|
|
|
|
## main-token-get-owner-set-repo-set-to-many-newline.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
␊
|
|
- actions/create-github-app-token␊
|
|
- actions/toolkit␊
|
|
- actions/checkout␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /repos/actions/create-github-app-token/installation␊
|
|
POST /app/installations/123456/access_tokens␊
|
|
{"repositories":["create-github-app-token","toolkit","checkout"]}`
|
|
|
|
## main-token-get-owner-set-repo-set-to-many.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
␊
|
|
- actions/create-github-app-token␊
|
|
- actions/toolkit␊
|
|
- actions/checkout␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /repos/actions/create-github-app-token/installation␊
|
|
POST /app/installations/123456/access_tokens␊
|
|
{"repositories":["create-github-app-token","toolkit","checkout"]}`
|
|
|
|
## main-token-get-owner-set-repo-set-to-one.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
`Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:␊
|
|
␊
|
|
- actions/create-github-app-token␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /repos/actions/create-github-app-token/installation␊
|
|
POST /app/installations/123456/access_tokens␊
|
|
{"repositories":["create-github-app-token"]}`
|
|
|
|
## main-token-get-owner-set-repo-unset.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
`Input 'repositories' is not set. Creating token for all repositories owned by actions.␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /users/actions/installation␊
|
|
POST /app/installations/123456/access_tokens␊
|
|
null`
|
|
|
|
## main-token-get-owner-unset-repo-set.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
`No 'owner' input provided. Using default owner 'actions' to create token for the following repositories:␊
|
|
- actions/create-github-app-token␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /repos/actions/create-github-app-token/installation␊
|
|
POST /app/installations/123456/access_tokens␊
|
|
{"repositories":["create-github-app-token"]}`
|
|
|
|
## main-token-get-owner-unset-repo-unset.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
`Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /repos/actions/create-github-app-token/installation␊
|
|
POST /app/installations/123456/access_tokens␊
|
|
{"repositories":["create-github-app-token"]}`
|
|
|
|
## main-token-permissions-set.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
`Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).␊
|
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
␊
|
|
::set-output name=installation-id::123456␊
|
|
␊
|
|
::set-output name=app-slug::github-actions␊
|
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
|
::save-state name=expiresAt::2016-07-11T22:14:10Z␊
|
|
--- REQUESTS ---␊
|
|
GET /repos/actions/create-github-app-token/installation␊
|
|
POST /app/installations/123456/access_tokens␊
|
|
{"repositories":["create-github-app-token"],"permissions":{"issues":"write","pull_requests":"read"}}`
|
|
|
|
## post-proxy-requires-native-support.test.js
|
|
|
|
> stderr
|
|
|
|
'A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.'
|
|
|
|
> stdout
|
|
|
|
'::error::A proxy environment variable is set, but Node.js native proxy support is not enabled. Set NODE_USE_ENV_PROXY=1 for this action step.'
|
|
|
|
## post-revoke-token-fail-response.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
'::warning::Token revocation failed: '
|
|
|
|
## post-token-expired.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
'Token expired, skipping token revocation'
|
|
|
|
## post-token-set.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
'Token revoked'
|
|
|
|
## post-token-skipped.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
'Token revocation was skipped'
|
|
|
|
## post-token-unset.test.js
|
|
|
|
> stderr
|
|
|
|
''
|
|
|
|
> stdout
|
|
|
|
'Token is not set'
|