Add metadata suite and relax lefthook requirement (#43)
* [auth] Add metadata suite for running metadata discovery tests Adds a new 'metadata' suite that runs just the auth/metadata-* scenarios for faster iteration when testing metadata discovery specifically. Usage: node dist/index.mjs client --suite metadata --command "..." 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Don't require lefthook to be installed Set assert_lefthook_installed to false so the hooks gracefully skip if lefthook is not installed on the system. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f14895ca0e
commit
82d83f286b
4 changed files with 14 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# lefthook.yml
|
||||
# Configuration reference: https://lefthook.dev/configuration/
|
||||
|
||||
assert_lefthook_installed: true
|
||||
assert_lefthook_installed: false
|
||||
|
||||
output:
|
||||
- meta # Print lefthook version
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ import {
|
|||
listScenarios,
|
||||
listClientScenarios,
|
||||
listActiveClientScenarios,
|
||||
listAuthScenarios
|
||||
listAuthScenarios,
|
||||
listMetadataScenarios
|
||||
} from './scenarios';
|
||||
import { ConformanceCheck } from './types';
|
||||
import { ClientOptionsSchema, ServerOptionsSchema } from './schemas';
|
||||
|
|
@ -51,7 +52,8 @@ program
|
|||
}
|
||||
|
||||
const suites: Record<string, () => string[]> = {
|
||||
auth: listAuthScenarios
|
||||
auth: listAuthScenarios,
|
||||
metadata: listMetadataScenarios
|
||||
};
|
||||
|
||||
const suiteName = options.suite.toLowerCase();
|
||||
|
|
@ -147,7 +149,7 @@ program
|
|||
console.error('Either --scenario or --suite is required');
|
||||
console.error('\nAvailable client scenarios:');
|
||||
listScenarios().forEach((s) => console.error(` - ${s}`));
|
||||
console.error('\nAvailable suites: auth');
|
||||
console.error('\nAvailable suites: auth, metadata');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -217,3 +217,8 @@ export const AuthMetadataVar3Scenario = createMetadataScenario(
|
|||
|
||||
// Export all scenarios as an array for convenience
|
||||
export const metadataScenarios = SCENARIO_CONFIGS.map(createMetadataScenario);
|
||||
|
||||
// Export function to list metadata scenario names (for suite support)
|
||||
export function listMetadataScenarios(): string[] {
|
||||
return metadataScenarios.map((s) => s.name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ import {
|
|||
} from './server/prompts.js';
|
||||
|
||||
import { authScenariosList } from './client/auth/index.js';
|
||||
import { listMetadataScenarios } from './client/auth/discovery-metadata.js';
|
||||
|
||||
// Pending client scenarios (not yet fully tested/implemented)
|
||||
const pendingClientScenariosList: ClientScenario[] = [
|
||||
|
|
@ -151,3 +152,5 @@ export function listActiveClientScenarios(): string[] {
|
|||
export function listAuthScenarios(): string[] {
|
||||
return authScenariosList.map((scenario) => scenario.name);
|
||||
}
|
||||
|
||||
export { listMetadataScenarios };
|
||||
|
|
|
|||
Loading…
Reference in a new issue