Skip to content

Commit 55e5ec5

Browse files
committed
NO-ISSUE Fix test
1 parent 0f0eed1 commit 55e5ec5

File tree

5 files changed

+16
-0
lines changed

5 files changed

+16
-0
lines changed

tests/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export const DEFAULT_ENV = {
88
// inputs are set as environment variables with the prefix INPUT_
99
// https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
1010
"INPUT_GITHUB-API-URL": "https://api.github.com",
11+
"INPUT_SKIP-TOKEN-REVOKE": "false",
12+
"INPUT_SKIP_TOKEN_REVOKE": "false",
1113
"INPUT_APP-ID": "123456",
1214
// This key is invalidated. It’s from https://github.com/octokit/auth-app.js/issues/465#issuecomment-1564998327.
1315
"INPUT_PRIVATE-KEY": `-----BEGIN RSA PRIVATE KEY-----

tests/post-revoke-token-fail-response.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ process.env.STATE_token = "secret123";
77
// inputs are set as environment variables with the prefix INPUT_
88
// https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
99
process.env["INPUT_GITHUB-API-URL"] = "https://api.github.com";
10+
process.env["INPUT_SKIP-TOKEN-REVOKE"] = "false";
11+
process.env["INPUT_SKIP_TOKEN_REVOKE"] = "false";
1012

1113
// 1 hour in the future, not expired
1214
process.env.STATE_expiresAt = new Date(

tests/post-token-expired.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ process.env.STATE_token = "secret123";
77
// 1 hour in the past, expired
88
process.env.STATE_expiresAt = new Date(Date.now() - 1000 * 60 * 60).toISOString();
99

10+
// inputs are set as environment variables with the prefix INPUT_
11+
// https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
12+
process.env["INPUT_SKIP-TOKEN-REVOKE"] = "false";
13+
process.env["INPUT_SKIP_TOKEN_REVOKE"] = "false";
14+
1015
const mockAgent = new MockAgent();
1116

1217
setGlobalDispatcher(mockAgent);

tests/post-token-set.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ process.env.STATE_token = "secret123";
77
// inputs are set as environment variables with the prefix INPUT_
88
// https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
99
process.env["INPUT_GITHUB-API-URL"] = "https://api.github.com";
10+
process.env["INPUT_SKIP-TOKEN-REVOKE"] = "false";
11+
process.env["INPUT_SKIP_TOKEN_REVOKE"] = "false";
1012

1113
// 1 hour in the future, not expired
1214
process.env.STATE_expiresAt = new Date(Date.now() + 1000 * 60 * 60).toISOString();

tests/post-token-unset.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
// https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#sending-values-to-the-pre-and-post-actions
33
delete process.env.STATE_token;
44

5+
// inputs are set as environment variables with the prefix INPUT_
6+
// https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
7+
process.env["INPUT_SKIP-TOKEN-REVOKE"] = "false";
8+
process.env["INPUT_SKIP_TOKEN_REVOKE"] = "false";
9+
510
await import("../post.js");

0 commit comments

Comments
 (0)