Skip to content

Commit

Permalink
Merge pull request #205 from openid/interop/api-gateway-test-harness
Browse files Browse the repository at this point in the history
add api gateway test runner and interop website scenario
  • Loading branch information
ogazitt authored Feb 7, 2025
2 parents f4187c1 + ae544ff commit 7a61404
Show file tree
Hide file tree
Showing 32 changed files with 3,494 additions and 9 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions interop/authzen-api-gateways/test-harness/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
21 changes: 21 additions & 0 deletions interop/authzen-api-gateways/test-harness/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Aserto

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
43 changes: 43 additions & 0 deletions interop/authzen-api-gateways/test-harness/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# AuthZEN API Gateway Test Runner

## Setup

### Install dependencies

To install the application dependencies, run the following command:

```shell
yarn
```

## Run tests against a PDP

First, build the project using `yarn build`.

Help for the `test` script:

```shell
yarn test

Usage: yarn test <authorizer-url> [<format>]

<format> should be one of:
console
markdown

and defaults to markdown
```

### Examples

Run the test suite, output to console:

```shell
yarn test https://authorizer.domain.com console
```

Run the test suite, output as markdown:

```shell
yarn test https://authorizer.domain.com markdown
```
30 changes: 30 additions & 0 deletions interop/authzen-api-gateways/test-harness/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "authzen-api-gateway-test-runner",
"version": "0.1.16",
"description": "AuthZEN API Gateway test runner",
"main": "test/runner.ts",
"scripts": {
"build": "yarn clean && tsc",
"clean": "rm -rf ./build",
"tsc": "tsc --noEmit --incremental",
"test": "node build/runner.js",
"test-clean": "yarn build && yarn test"
},
"keywords": [],
"author": "Omri Gazitt <[email protected]>",
"license": "MIT",
"dependencies": {
"cli-color": "^2.0.4",
"node-fetch": "^3.3.2"
},
"devDependencies": {
"@types/cli-color": "^2.0.6",
"@types/node": "^17.0.45",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"eslint": "^8.12.0",
"ts-node": "^10.7.0",
"typescript": "^4.6.2"
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit 7a61404

Please sign in to comment.