From 6beb135311501cd743043a11f4e0bb39340a5fe8 Mon Sep 17 00:00:00 2001 From: Viduni Wickramarachchi Date: Fri, 3 Jan 2025 08:32:15 -0500 Subject: [PATCH] [Obs AI Assistant] Remove URL constant (#204884) --- .../ai_assistant/tests/connectors/connectors.spec.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/tests/connectors/connectors.spec.ts b/x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/tests/connectors/connectors.spec.ts index 5ea2ad9e873bb..2c112f85fc219 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/tests/connectors/connectors.spec.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/tests/connectors/connectors.spec.ts @@ -14,8 +14,6 @@ import type { SupertestWithoutAuthProviderType, } from '../../../../../../shared/services'; -const CONNECTOR_API_URL = '/internal/observability_ai_assistant/connectors'; - export default function ApiTest({ getService }: FtrProviderContext) { const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient'); const supertestWithoutAuth = getService('supertestWithoutAuth'); @@ -49,14 +47,14 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('Returns a 2xx for enterprise license', async () => { await observabilityAIAssistantAPIClient .slsEditor({ - endpoint: `GET ${CONNECTOR_API_URL}`, + endpoint: `GET /internal/observability_ai_assistant/connectors`, }) .expect(200); }); it('returns an empty list of connectors', async () => { const res = await observabilityAIAssistantAPIClient.slsEditor({ - endpoint: `GET ${CONNECTOR_API_URL}`, + endpoint: `GET /internal/observability_ai_assistant/connectors`, }); expect(res.body.length).to.be(0); @@ -72,7 +70,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); const res = await observabilityAIAssistantAPIClient.slsEditor({ - endpoint: `GET ${CONNECTOR_API_URL}`, + endpoint: `GET /internal/observability_ai_assistant/connectors`, }); expect(res.body.length).to.be(1); @@ -90,7 +88,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('should deny access for users without the ai_assistant privilege', async () => { await observabilityAIAssistantAPIClient .slsUnauthorized({ - endpoint: `GET ${CONNECTOR_API_URL}`, + endpoint: `GET /internal/observability_ai_assistant/connectors`, }) .expect(403); });