Update deps (#384)
This commit is contained in:
parent
f6de81663f
commit
aaf2e69f95
4
dist/main/index.js
vendored
4
dist/main/index.js
vendored
File diff suppressed because one or more lines are too long
4
dist/post/index.js
vendored
4
dist/post/index.js
vendored
File diff suppressed because one or more lines are too long
148
package-lock.json
generated
148
package-lock.json
generated
@ -11,17 +11,17 @@
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/http-client": "^2.2.0",
|
||||
"@google-github-actions/actions-utils": "^0.5.2"
|
||||
"@google-github-actions/actions-utils": "^0.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.10.7",
|
||||
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
||||
"@typescript-eslint/parser": "^6.18.0",
|
||||
"@types/node": "^20.11.5",
|
||||
"@typescript-eslint/eslint-plugin": "^6.19.1",
|
||||
"@typescript-eslint/parser": "^6.19.1",
|
||||
"@vercel/ncc": "^0.38.1",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.2",
|
||||
"prettier": "^3.1.1",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"prettier": "^3.2.4",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.3.3"
|
||||
}
|
||||
@ -152,21 +152,21 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@google-github-actions/actions-utils": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@google-github-actions/actions-utils/-/actions-utils-0.5.2.tgz",
|
||||
"integrity": "sha512-yowU1yGq1fV6qUV2L6xThtLW0ENYjWJwZpFY3V4JorwnGqwmiUmRLSAADiFdefHkACv6ge8rTyORzhF3GAIk3w==",
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@google-github-actions/actions-utils/-/actions-utils-0.7.0.tgz",
|
||||
"integrity": "sha512-rFA3m+cNbet+NACfuyakhTwTKSnZbPtub8BGQ7Oqt7qB7nUVBfl0l3wjiAgHdMP50e8DGnfC515iQlwLzSumlw==",
|
||||
"dependencies": {
|
||||
"yaml": "^2.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@humanwhocodes/config-array": {
|
||||
"version": "0.11.13",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz",
|
||||
"integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==",
|
||||
"version": "0.11.14",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
|
||||
"integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@humanwhocodes/object-schema": "^2.0.1",
|
||||
"debug": "^4.1.1",
|
||||
"@humanwhocodes/object-schema": "^2.0.2",
|
||||
"debug": "^4.3.1",
|
||||
"minimatch": "^3.0.5"
|
||||
},
|
||||
"engines": {
|
||||
@ -209,9 +209,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@humanwhocodes/object-schema": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz",
|
||||
"integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
|
||||
"integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@jridgewell/resolve-uri": {
|
||||
@ -275,9 +275,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@pkgr/core": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.0.tgz",
|
||||
"integrity": "sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==",
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
|
||||
"integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
|
||||
@ -317,9 +317,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.10.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.7.tgz",
|
||||
"integrity": "sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==",
|
||||
"version": "20.11.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz",
|
||||
"integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
@ -332,16 +332,16 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.18.0.tgz",
|
||||
"integrity": "sha512-3lqEvQUdCozi6d1mddWqd+kf8KxmGq2Plzx36BlkjuQe3rSTm/O98cLf0A4uDO+a5N1KD2SeEEl6fW97YHY+6w==",
|
||||
"version": "6.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.19.1.tgz",
|
||||
"integrity": "sha512-roQScUGFruWod9CEyoV5KlCYrubC/fvG8/1zXuT0WTcxX87GnMMmnksMwSg99lo1xiKrBzw2icsJPMAw1OtKxg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.5.1",
|
||||
"@typescript-eslint/scope-manager": "6.18.0",
|
||||
"@typescript-eslint/type-utils": "6.18.0",
|
||||
"@typescript-eslint/utils": "6.18.0",
|
||||
"@typescript-eslint/visitor-keys": "6.18.0",
|
||||
"@typescript-eslint/scope-manager": "6.19.1",
|
||||
"@typescript-eslint/type-utils": "6.19.1",
|
||||
"@typescript-eslint/utils": "6.19.1",
|
||||
"@typescript-eslint/visitor-keys": "6.19.1",
|
||||
"debug": "^4.3.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.2.4",
|
||||
@ -367,15 +367,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.18.0.tgz",
|
||||
"integrity": "sha512-v6uR68SFvqhNQT41frCMCQpsP+5vySy6IdgjlzUWoo7ALCnpaWYcz/Ij2k4L8cEsL0wkvOviCMpjmtRtHNOKzA==",
|
||||
"version": "6.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.19.1.tgz",
|
||||
"integrity": "sha512-WEfX22ziAh6pRE9jnbkkLGp/4RhTpffr2ZK5bJ18M8mIfA8A+k97U9ZyaXCEJRlmMHh7R9MJZWXp/r73DzINVQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "6.18.0",
|
||||
"@typescript-eslint/types": "6.18.0",
|
||||
"@typescript-eslint/typescript-estree": "6.18.0",
|
||||
"@typescript-eslint/visitor-keys": "6.18.0",
|
||||
"@typescript-eslint/scope-manager": "6.19.1",
|
||||
"@typescript-eslint/types": "6.19.1",
|
||||
"@typescript-eslint/typescript-estree": "6.19.1",
|
||||
"@typescript-eslint/visitor-keys": "6.19.1",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@ -395,13 +395,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.18.0.tgz",
|
||||
"integrity": "sha512-o/UoDT2NgOJ2VfHpfr+KBY2ErWvCySNUIX/X7O9g8Zzt/tXdpfEU43qbNk8LVuWUT2E0ptzTWXh79i74PP0twA==",
|
||||
"version": "6.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.19.1.tgz",
|
||||
"integrity": "sha512-4CdXYjKf6/6aKNMSly/BP4iCSOpvMmqtDzRtqFyyAae3z5kkqEjKndR5vDHL8rSuMIIWP8u4Mw4VxLyxZW6D5w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.18.0",
|
||||
"@typescript-eslint/visitor-keys": "6.18.0"
|
||||
"@typescript-eslint/types": "6.19.1",
|
||||
"@typescript-eslint/visitor-keys": "6.19.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
@ -412,13 +412,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.18.0.tgz",
|
||||
"integrity": "sha512-ZeMtrXnGmTcHciJN1+u2CigWEEXgy1ufoxtWcHORt5kGvpjjIlK9MUhzHm4RM8iVy6dqSaZA/6PVkX6+r+ChjQ==",
|
||||
"version": "6.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.19.1.tgz",
|
||||
"integrity": "sha512-0vdyld3ecfxJuddDjACUvlAeYNrHP/pDeQk2pWBR2ESeEzQhg52DF53AbI9QCBkYE23lgkhLCZNkHn2hEXXYIg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "6.18.0",
|
||||
"@typescript-eslint/utils": "6.18.0",
|
||||
"@typescript-eslint/typescript-estree": "6.19.1",
|
||||
"@typescript-eslint/utils": "6.19.1",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^1.0.1"
|
||||
},
|
||||
@ -439,9 +439,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.18.0.tgz",
|
||||
"integrity": "sha512-/RFVIccwkwSdW/1zeMx3hADShWbgBxBnV/qSrex6607isYjj05t36P6LyONgqdUrNLl5TYU8NIKdHUYpFvExkA==",
|
||||
"version": "6.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.19.1.tgz",
|
||||
"integrity": "sha512-6+bk6FEtBhvfYvpHsDgAL3uo4BfvnTnoge5LrrCj2eJN8g3IJdLTD4B/jK3Q6vo4Ql/Hoip9I8aB6fF+6RfDqg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
@ -452,13 +452,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.18.0.tgz",
|
||||
"integrity": "sha512-klNvl+Ql4NsBNGB4W9TZ2Od03lm7aGvTbs0wYaFYsplVPhr+oeXjlPZCDI4U9jgJIDK38W1FKhacCFzCC+nbIg==",
|
||||
"version": "6.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.19.1.tgz",
|
||||
"integrity": "sha512-aFdAxuhzBFRWhy+H20nYu19+Km+gFfwNO4TEqyszkMcgBDYQjmPJ61erHxuT2ESJXhlhrO7I5EFIlZ+qGR8oVA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.18.0",
|
||||
"@typescript-eslint/visitor-keys": "6.18.0",
|
||||
"@typescript-eslint/types": "6.19.1",
|
||||
"@typescript-eslint/visitor-keys": "6.19.1",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@ -480,17 +480,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.18.0.tgz",
|
||||
"integrity": "sha512-wiKKCbUeDPGaYEYQh1S580dGxJ/V9HI7K5sbGAVklyf+o5g3O+adnS4UNJajplF4e7z2q0uVBaTdT/yLb4XAVA==",
|
||||
"version": "6.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.19.1.tgz",
|
||||
"integrity": "sha512-JvjfEZuP5WoMqwh9SPAPDSHSg9FBHHGhjPugSRxu5jMfjvBpq5/sGTD+9M9aQ5sh6iJ8AY/Kk/oUYVEMAPwi7w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@types/json-schema": "^7.0.12",
|
||||
"@types/semver": "^7.5.0",
|
||||
"@typescript-eslint/scope-manager": "6.18.0",
|
||||
"@typescript-eslint/types": "6.18.0",
|
||||
"@typescript-eslint/typescript-estree": "6.18.0",
|
||||
"@typescript-eslint/scope-manager": "6.19.1",
|
||||
"@typescript-eslint/types": "6.19.1",
|
||||
"@typescript-eslint/typescript-estree": "6.19.1",
|
||||
"semver": "^7.5.4"
|
||||
},
|
||||
"engines": {
|
||||
@ -505,12 +505,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "6.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.18.0.tgz",
|
||||
"integrity": "sha512-1wetAlSZpewRDb2h9p/Q8kRjdGuqdTAQbkJIOUMLug2LBLG+QOjiWoSj6/3B/hA9/tVTFFdtiKvAYoYnSRW/RA==",
|
||||
"version": "6.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.19.1.tgz",
|
||||
"integrity": "sha512-gkdtIO+xSO/SmI0W68DBg4u1KElmIUo3vXzgHyGPs6cxgB0sa3TlptRAAE0hUY1hM6FcDKEv7aIwiTGm76cXfQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.18.0",
|
||||
"@typescript-eslint/types": "6.19.1",
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
},
|
||||
"engines": {
|
||||
@ -558,9 +558,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/acorn-walk": {
|
||||
"version": "8.3.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz",
|
||||
"integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==",
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz",
|
||||
"integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
@ -859,9 +859,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-prettier": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.2.tgz",
|
||||
"integrity": "sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==",
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz",
|
||||
"integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"prettier-linter-helpers": "^1.0.0",
|
||||
@ -1589,9 +1589,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz",
|
||||
"integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==",
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz",
|
||||
"integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
|
12
package.json
12
package.json
@ -25,17 +25,17 @@
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/http-client": "^2.2.0",
|
||||
"@google-github-actions/actions-utils": "^0.5.2"
|
||||
"@google-github-actions/actions-utils": "^0.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.10.7",
|
||||
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
||||
"@typescript-eslint/parser": "^6.18.0",
|
||||
"@types/node": "^20.11.5",
|
||||
"@typescript-eslint/eslint-plugin": "^6.19.1",
|
||||
"@typescript-eslint/parser": "^6.19.1",
|
||||
"@vercel/ncc": "^0.38.1",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.2",
|
||||
"prettier": "^3.1.1",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"prettier": "^3.2.4",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.3.3"
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { describe, it } from 'node:test';
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert';
|
||||
|
||||
import { join as pathjoin } from 'path';
|
||||
@ -41,10 +41,9 @@ const credentialsJSON = `
|
||||
}
|
||||
`;
|
||||
|
||||
describe('ServiceAccountKeyClient', () => {
|
||||
describe('#parseServiceAccountKeyJSON', () => {
|
||||
it('throws exception on invalid json', async () => {
|
||||
assert.rejects(async () => {
|
||||
test('#parseServiceAccountKeyJSON', { concurrency: true }, async (suite) => {
|
||||
await suite.test('throws exception on invalid json', async () => {
|
||||
await assert.rejects(async () => {
|
||||
new ServiceAccountKeyClient({
|
||||
logger: new NullLogger(),
|
||||
universe: 'googleapis.com',
|
||||
@ -53,8 +52,8 @@ describe('ServiceAccountKeyClient', () => {
|
||||
}, SyntaxError);
|
||||
});
|
||||
|
||||
it('handles base64', async () => {
|
||||
assert.rejects(async () => {
|
||||
await suite.test('handles base64', async () => {
|
||||
await assert.rejects(async () => {
|
||||
new ServiceAccountKeyClient({
|
||||
logger: new NullLogger(),
|
||||
universe: 'googleapis.com',
|
||||
@ -64,8 +63,8 @@ describe('ServiceAccountKeyClient', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getToken', () => {
|
||||
it('gets a token', async () => {
|
||||
test('#getToken', { concurrency: true }, async (suite) => {
|
||||
await suite.test('gets a token', async () => {
|
||||
const client = new ServiceAccountKeyClient({
|
||||
logger: new NullLogger(),
|
||||
universe: 'googleapis.com',
|
||||
@ -77,8 +76,8 @@ describe('ServiceAccountKeyClient', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#signJWT', () => {
|
||||
it('signs a jwt', async () => {
|
||||
test('#signJWT', { concurrency: true }, async (suite) => {
|
||||
await suite.test('signs a jwt', async () => {
|
||||
const client = new ServiceAccountKeyClient({
|
||||
logger: new NullLogger(),
|
||||
universe: 'googleapis.com',
|
||||
@ -90,8 +89,8 @@ describe('ServiceAccountKeyClient', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#createCredentialsFile', () => {
|
||||
it('writes the file', async () => {
|
||||
test('#createCredentialsFile', { concurrency: true }, async (suite) => {
|
||||
await suite.test('writes the file', async () => {
|
||||
const outputFile = pathjoin(tmpdir(), randomFilename());
|
||||
const client = new ServiceAccountKeyClient({
|
||||
logger: new NullLogger(),
|
||||
@ -108,4 +107,3 @@ describe('ServiceAccountKeyClient', () => {
|
||||
assert.deepStrictEqual(got, exp);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { describe, it } from 'node:test';
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert';
|
||||
|
||||
import { tmpdir } from 'os';
|
||||
@ -24,9 +24,8 @@ import { randomFilename } from '@google-github-actions/actions-utils';
|
||||
import { NullLogger } from '../../src/logger';
|
||||
import { WorkloadIdentityFederationClient } from '../../src/client/workload_identity_federation';
|
||||
|
||||
describe('WorkloadIdentityFederationClient', () => {
|
||||
describe('#createCredentialsFile', () => {
|
||||
it('writes the file', async () => {
|
||||
test('#createCredentialsFile', { concurrency: true }, async (suite) => {
|
||||
await suite.test('writes the file', async () => {
|
||||
const outputFile = pathjoin(tmpdir(), randomFilename());
|
||||
const client = new WorkloadIdentityFederationClient({
|
||||
logger: new NullLogger(),
|
||||
@ -63,7 +62,7 @@ describe('WorkloadIdentityFederationClient', () => {
|
||||
assert.deepStrictEqual(got, exp);
|
||||
});
|
||||
|
||||
it('writes the file with impersonation', async () => {
|
||||
await suite.test('writes the file with impersonation', async () => {
|
||||
const outputFile = pathjoin(tmpdir(), randomFilename());
|
||||
const client = new WorkloadIdentityFederationClient({
|
||||
logger: new NullLogger(),
|
||||
@ -103,4 +102,3 @@ describe('WorkloadIdentityFederationClient', () => {
|
||||
assert.deepStrictEqual(got, exp);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { describe, it } from 'node:test';
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert';
|
||||
|
||||
import {
|
||||
@ -23,8 +23,7 @@ import {
|
||||
projectIDFromServiceAccountEmail,
|
||||
} from '../src/utils';
|
||||
|
||||
describe('Utils', async () => {
|
||||
describe('#buildDomainWideDelegationJWT', async () => {
|
||||
test('#buildDomainWideDelegationJWT', { concurrency: true }, async (suite) => {
|
||||
const cases = [
|
||||
{
|
||||
name: 'default',
|
||||
@ -45,8 +44,8 @@ describe('Utils', async () => {
|
||||
},
|
||||
];
|
||||
|
||||
cases.forEach((tc) => {
|
||||
it(tc.name, async () => {
|
||||
for await (const tc of cases) {
|
||||
await suite.test(tc.name, async () => {
|
||||
const val = buildDomainWideDelegationJWT(
|
||||
tc.serviceAccount,
|
||||
tc.subject,
|
||||
@ -60,10 +59,10 @@ describe('Utils', async () => {
|
||||
assert.deepStrictEqual(body.sub, tc.subject);
|
||||
assert.deepStrictEqual(body.scope, tc.scopes?.join(' '));
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
describe('#computeProjectID', async () => {
|
||||
test('#computeProjectID', { concurrency: true }, async (suite) => {
|
||||
const cases = [
|
||||
{
|
||||
name: 'directly given',
|
||||
@ -87,8 +86,8 @@ describe('Utils', async () => {
|
||||
},
|
||||
];
|
||||
|
||||
cases.forEach(async (tc) => {
|
||||
it(tc.name, async () => {
|
||||
for await (const tc of cases) {
|
||||
await suite.test(tc.name, async () => {
|
||||
const result = computeProjectID(
|
||||
tc.projectID,
|
||||
tc.serviceAccountEmail,
|
||||
@ -96,10 +95,10 @@ describe('Utils', async () => {
|
||||
);
|
||||
assert.deepStrictEqual(result, tc.exp);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
describe('#computeServiceAccountEmail', async () => {
|
||||
test('#computeServiceAccountEmail', { concurrency: true }, async (suite) => {
|
||||
const cases = [
|
||||
{
|
||||
name: 'directly given',
|
||||
@ -122,15 +121,15 @@ describe('Utils', async () => {
|
||||
},
|
||||
];
|
||||
|
||||
cases.forEach(async (tc) => {
|
||||
it(tc.name, async () => {
|
||||
for await (const tc of cases) {
|
||||
await suite.test(tc.name, async () => {
|
||||
const result = computeServiceAccountEmail(tc.serviceAccountEmail, tc.serviceAccountKeyJSON);
|
||||
assert.deepStrictEqual(result, tc.exp);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
describe('#projectIDFromServiceAccountEmail', async () => {
|
||||
test('#projectIDFromServiceAccountEmail', { concurrency: true }, async (suite) => {
|
||||
const cases = [
|
||||
{
|
||||
name: 'empty',
|
||||
@ -154,20 +153,19 @@ describe('Utils', async () => {
|
||||
},
|
||||
];
|
||||
|
||||
cases.forEach(async (tc) => {
|
||||
it(tc.name, async () => {
|
||||
for await (const tc of cases) {
|
||||
await suite.test(tc.name, async () => {
|
||||
const result = projectIDFromServiceAccountEmail(tc.input);
|
||||
assert.deepStrictEqual(result, tc.exp);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
describe('#generateCredentialsFilename', async () => {
|
||||
it('returns a string matching the regex', () => {
|
||||
test('#generateCredentialsFilename', { concurrency: true }, async (suite) => {
|
||||
await suite.test('returns a string matching the regex', () => {
|
||||
for (let i = 0; i < 10; i++) {
|
||||
const filename = generateCredentialsFilename();
|
||||
assert.match(filename, /gha-creds-[0-9a-z]{16}\.json/);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user