[Obs AI Assistant] Prefer observabilityAIAssistantAPIClient
over supertest
#205599
Labels
observabilityAIAssistantAPIClient
over supertest
#205599
For api and e2e tests we should use
observabilityAIAssistantAPIClient
when calling any of the Obs AI Assistants endpoints (internal and public).supertest
should only be used for calling apis for the platform and other plugins.observabilityAIAssistantAPIClient
is type safety so errors caused by invalid urls/params will be surfaces at compile time. Withsupertest
these errors are not visible before running the test.Places where
supertest
is used for calling own endpoints:kibana/x-pack/test/observability_ai_assistant_api_integration/tests/chat/chat.spec.ts
Lines 56 to 65 in 4eb9006
kibana/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts
Lines 80 to 89 in 4eb9006
kibana/x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/tests/chat/chat.spec.ts
Lines 92 to 100 in 4eb9006
kibana/x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/tests/complete/complete.spec.ts
Lines 89 to 97 in 4eb9006
The text was updated successfully, but these errors were encountered: