From 10e5193077d9b3fd36cc0320b7c979bb3bddba1c Mon Sep 17 00:00:00 2001 From: William Mantly Date: Fri, 7 Aug 2026 23:35:20 -0400 Subject: [PATCH] test: update api_agent_ops test to match default paths 200 response --- nodejs/tests/api_agent_ops.test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nodejs/tests/api_agent_ops.test.js b/nodejs/tests/api_agent_ops.test.js index 5537112..c17de60 100644 --- a/nodejs/tests/api_agent_ops.test.js +++ b/nodejs/tests/api_agent_ops.test.js @@ -60,13 +60,15 @@ describe('Agent ops — POST /api/v1/agent/secrets', () => { expect(res.status).toBe(401); }); - test('missing paths returns 400', async () => { + test('missing paths defaults to agent node & resource secrets', async () => { const { token } = await enrollAgent(); const res = await request(app) .post('/api/v1/agent/secrets') .set('Authorization', `Bearer ${token}`) .send({}); - expect(res.status).toBe(400); + expect(res.status).toBe(200); + expect(res.body.status).toBe('ok'); + expect(res.body.secrets).toBeDefined(); }); });