Skip to content

Commit

Permalink
[Search serverless / Connectors FTRs] Update test role to developer (e…
Browse files Browse the repository at this point in the history
…lastic#206067)

## Summary

`viewer` role is not sufficient to call Connector APIs with new change
elastic/elasticsearch#119863

Update the FTR tests to use developer role for testing
  • Loading branch information
jedrazb authored and Zacqary committed Jan 9, 2025
1 parent d54b7e4 commit 5a2a6a2
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,20 @@ const API_BASE_PATH = '/internal/serverless_search';

export default function ({ getService }: FtrProviderContext) {
const roleScopedSupertest = getService('roleScopedSupertest');
let supertestViewerWithCookieCredentials: SupertestWithRoleScope;
let supertestDeveloperWithCookieCredentials: SupertestWithRoleScope;

describe('Connectors routes', function () {
describe('GET connectors', function () {
before(async () => {
supertestViewerWithCookieCredentials = await roleScopedSupertest.getSupertestWithRoleScope(
'viewer',
{
supertestDeveloperWithCookieCredentials =
await roleScopedSupertest.getSupertestWithRoleScope('developer', {
useCookieHeader: true,
withInternalHeaders: true,
}
);
});
});

it('returns list of connectors', async () => {
const { body } = await supertestViewerWithCookieCredentials
const { body } = await supertestDeveloperWithCookieCredentials
.get(`${API_BASE_PATH}/connectors`)
.expect(200);

Expand Down

0 comments on commit 5a2a6a2

Please sign in to comment.