diff --git a/test/jest_integration/basic_auth.test.ts b/test/jest_integration/basic_auth.test.ts index 0550a51c0..907113154 100644 --- a/test/jest_integration/basic_auth.test.ts +++ b/test/jest_integration/basic_auth.test.ts @@ -216,6 +216,10 @@ describe('start OpenSearch Dashboards server', () => { }); it('redirect for home follows login', async () => { + const logout = await osdTestServer.request + .post(root, '/auth/logout') + .unset(AUTHORIZATION_HEADER_NAME); + const response = await osdTestServer.request .get(root, '/app/home#/') .unset(AUTHORIZATION_HEADER_NAME); @@ -241,6 +245,10 @@ describe('start OpenSearch Dashboards server', () => { const startingPath = `/app/dashboards#/view/edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b`; const expectedPath = `/app/login?nextUrl=%2Fapp%2Fdashboards`; + const logout = await osdTestServer.request + .post(root, '/auth/logout') + .unset(AUTHORIZATION_HEADER_NAME); + const response = await osdTestServer.request .get(root, startingPath) .unset(AUTHORIZATION_HEADER_NAME);