[scenario] Add test for broken oauth client (#12)
* starting on broken auth client * switch to middleware approach * add broken example * fix failure testing * subset matching
This commit is contained in:
parent
f7bc687819
commit
f95f487ae8
1 changed files with 343 additions and 67 deletions
|
|
@ -1,5 +1,8 @@
|
|||
import { describe, test } from '@jest/globals';
|
||||
import { runClientAgainstScenario } from './helpers/testClient.js';
|
||||
import {
|
||||
runClientAgainstScenario,
|
||||
SpawnedClientRunner
|
||||
} from './test_helpers/testClient.js';
|
||||
import path from 'path';
|
||||
|
||||
describe('PRM Path-Based Discovery', () => {
|
||||
|
|
@ -8,6 +11,19 @@ describe('PRM Path-Based Discovery', () => {
|
|||
process.cwd(),
|
||||
'examples/clients/typescript/auth-test.ts'
|
||||
);
|
||||
await runClientAgainstScenario(clientPath, 'auth/basic-dcr');
|
||||
const runner = new SpawnedClientRunner(clientPath);
|
||||
await runClientAgainstScenario(runner, 'auth/basic-dcr');
|
||||
});
|
||||
|
||||
test('bad client requests root PRM location', async () => {
|
||||
const clientPath = path.join(
|
||||
process.cwd(),
|
||||
'examples/clients/typescript/auth-test-broken1.ts'
|
||||
);
|
||||
const runner = new SpawnedClientRunner(clientPath);
|
||||
await runClientAgainstScenario(runner, 'auth/basic-dcr', [
|
||||
// There will be other failures, but this is the one that matters
|
||||
'prm-priority-order'
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue