From 06b2812ecf5b8d80efb598ea3314560be5d0bfdb Mon Sep 17 00:00:00 2001 From: merlinz01 Date: Fri, 4 Oct 2024 15:28:58 -0400 Subject: [PATCH] update test for missing JWT Signed-off-by: merlinz01 --- test/jest_integration/jwt_multiauth.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/jest_integration/jwt_multiauth.test.ts b/test/jest_integration/jwt_multiauth.test.ts index 1b19879b..dfe7bba1 100644 --- a/test/jest_integration/jwt_multiauth.test.ts +++ b/test/jest_integration/jwt_multiauth.test.ts @@ -171,8 +171,10 @@ describe('start OpenSearch Dashboards server', () => { it('Verify access to login page without JWT', async () => { console.log('Wreck access login page without JWT'); - await wreck.get('http://localhost:5601/app/login', { + const response = await wreck.get('http://localhost:5601/app/home', { rejectUnauthorized: true, }); + expect(response.res.statusCode).toEqual(302); + expect(response.res.headers.location).toEqual('/app/login?nextUrl=%2Fapp%2Fhome'); }); });