mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Fixes serverless common API security response headers API tests (#162655)
Unblocks #162149 ## Summary Fixes serverless security response headers tests by using the internal request header. This PR also opts to use the `/logout` redirect endpoint in testing, as it is more relevant to serverless.
This commit is contained in:
parent
b867d42f84
commit
614044bff5
1 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
it('API endpoint response contains default security headers', async () => {
|
||||
const { header } = await supertest
|
||||
.get(`/internal/security/me`)
|
||||
.set(svlCommonApi.getCommonRequestHeader())
|
||||
.set(svlCommonApi.getInternalRequestHeader())
|
||||
.expect(200);
|
||||
|
||||
expect(header).toBeDefined();
|
||||
|
@ -40,9 +40,9 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
it('redirect endpoint response contains default security headers', async () => {
|
||||
const { header } = await supertest
|
||||
.get(`/login`)
|
||||
.get(`/logout`)
|
||||
.set(svlCommonApi.getCommonRequestHeader())
|
||||
.expect(302);
|
||||
.expect(200);
|
||||
|
||||
expect(header).toBeDefined();
|
||||
expect(header['content-security-policy']).toEqual(defaultCSP);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue