mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:20:43 +00:00
test: move root contract fixture
This commit is contained in:
147
test/fixtures/talk-config-contract.json
vendored
Normal file
147
test/fixtures/talk-config-contract.json
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
{
|
||||
"selectionCases": [
|
||||
{
|
||||
"id": "canonical_resolved_wins",
|
||||
"defaultProvider": "elevenlabs",
|
||||
"payloadValid": true,
|
||||
"expectedSelection": {
|
||||
"provider": "elevenlabs",
|
||||
"normalizedPayload": true,
|
||||
"voiceId": "voice-normalized",
|
||||
"apiKey": "xxxxx"
|
||||
},
|
||||
"talk": {
|
||||
"resolved": {
|
||||
"provider": "elevenlabs",
|
||||
"config": {
|
||||
"voiceId": "voice-resolved",
|
||||
"apiKey": "xxxxx"
|
||||
}
|
||||
},
|
||||
"provider": "elevenlabs",
|
||||
"providers": {
|
||||
"elevenlabs": {
|
||||
"voiceId": "voice-normalized",
|
||||
"apiKey": "xxxxx"
|
||||
}
|
||||
},
|
||||
"voiceId": "voice-legacy",
|
||||
"apiKey": "xxxxx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "normalized_missing_resolved",
|
||||
"defaultProvider": "elevenlabs",
|
||||
"payloadValid": true,
|
||||
"expectedSelection": {
|
||||
"provider": "elevenlabs",
|
||||
"normalizedPayload": true,
|
||||
"voiceId": "voice-normalized"
|
||||
},
|
||||
"talk": {
|
||||
"provider": "elevenlabs",
|
||||
"providers": {
|
||||
"elevenlabs": {
|
||||
"voiceId": "voice-normalized"
|
||||
}
|
||||
},
|
||||
"voiceId": "voice-legacy"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "provider_mismatch_missing_resolved",
|
||||
"defaultProvider": "elevenlabs",
|
||||
"payloadValid": false,
|
||||
"expectedSelection": null,
|
||||
"talk": {
|
||||
"provider": "acme",
|
||||
"providers": {
|
||||
"elevenlabs": {
|
||||
"voiceId": "voice-normalized"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ambiguous_providers_missing_resolved",
|
||||
"defaultProvider": "elevenlabs",
|
||||
"payloadValid": false,
|
||||
"expectedSelection": null,
|
||||
"talk": {
|
||||
"providers": {
|
||||
"acme": {
|
||||
"voiceId": "voice-acme"
|
||||
},
|
||||
"elevenlabs": {
|
||||
"voiceId": "voice-normalized"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "legacy_payload_fallback",
|
||||
"defaultProvider": "elevenlabs",
|
||||
"payloadValid": true,
|
||||
"expectedSelection": {
|
||||
"provider": "elevenlabs",
|
||||
"normalizedPayload": true,
|
||||
"voiceId": "voice-legacy",
|
||||
"apiKey": "xxxxx"
|
||||
},
|
||||
"talk": {
|
||||
"voiceId": "voice-legacy",
|
||||
"apiKey": "xxxxx"
|
||||
}
|
||||
}
|
||||
],
|
||||
"timeoutCases": [
|
||||
{
|
||||
"id": "integer_timeout_kept",
|
||||
"fallback": 700,
|
||||
"expectedTimeoutMs": 1500,
|
||||
"talk": {
|
||||
"silenceTimeoutMs": 1500
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "integer_like_double_timeout_kept",
|
||||
"fallback": 700,
|
||||
"expectedTimeoutMs": 1500,
|
||||
"talk": {
|
||||
"silenceTimeoutMs": 1500.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "zero_timeout_falls_back",
|
||||
"fallback": 700,
|
||||
"expectedTimeoutMs": 700,
|
||||
"talk": {
|
||||
"silenceTimeoutMs": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "boolean_timeout_falls_back",
|
||||
"fallback": 700,
|
||||
"expectedTimeoutMs": 700,
|
||||
"talk": {
|
||||
"silenceTimeoutMs": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "string_timeout_falls_back",
|
||||
"fallback": 700,
|
||||
"expectedTimeoutMs": 700,
|
||||
"talk": {
|
||||
"silenceTimeoutMs": "1500"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fractional_timeout_falls_back",
|
||||
"fallback": 700,
|
||||
"expectedTimeoutMs": 700,
|
||||
"talk": {
|
||||
"silenceTimeoutMs": 1500.5
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -743,7 +743,10 @@ describe("scripts/changed-lanes", () => {
|
||||
});
|
||||
|
||||
it("routes root test/support changes to the tooling test lane instead of all lanes", () => {
|
||||
const result = detectChangedLanes(["test/git-hooks-pre-commit.test.ts"]);
|
||||
const result = detectChangedLanes([
|
||||
"test/git-hooks-pre-commit.test.ts",
|
||||
"test-fixtures/legacy-root-fixture.json",
|
||||
]);
|
||||
const plan = createChangedCheckPlan(result);
|
||||
|
||||
expect(result.lanes).toMatchObject({
|
||||
|
||||
Reference in New Issue
Block a user