[Search serverless / Connectors FTRs] Update test role to developer (#206067)

## Summary

`viewer` role is not sufficient to call Connector APIs with new change
https://github.com/elastic/elasticsearch/pull/119863

Update the FTR tests to use developer role for testing
This commit is contained in:
Jedr Blaszyk 2025-01-09 16:45:30 +01:00 committed by GitHub
parent 37d7a5efb7
commit 542a56b482
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);