Skip to content

Commit f9599fb

Browse files
committed
test(gateway): prove the policy DELETE removed the section before the legacy comparison
1 parent af06696 commit f9599fb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/agent-gateway/test/subagentModelPolicy.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,11 @@ describe('server-v2 /api/v1/config/subagent-model-policy', () => {
207207
await boot();
208208
await call('PUT', { mode: 'force', default_model: 'acme/sol', default_effort: 'low' });
209209
const viaPut = await disk();
210-
await call('DELETE');
210+
expect(viaPut).toContain('[secondary_model]');
211+
const removed = await call('DELETE');
212+
expect(removed.body.code).toBe(0);
213+
expect(removed.body.data?.policy).toEqual({ mode: 'inherit' });
214+
expect(await disk()).not.toContain('secondary_model');
211215
const legacy = await authedFetch(server as RunningServer, base, '/api/v1/config', {
212216
method: 'POST',
213217
headers: { 'content-type': 'application/json' },

0 commit comments

Comments
 (0)