mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Obs AI Assistant] Fix connector test in MKI (#211235)
Closes https://github.com/elastic/kibana/issues/211175 ## Problem The connectors test is failing Serverless because we now have a pre-configured inference connector ## Solution Filter out the pre-configured inference connector in tests ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
This commit is contained in:
parent
0a50f776eb
commit
c1d0559738
1 changed files with 8 additions and 5 deletions
|
@ -11,9 +11,6 @@ import type { DeploymentAgnosticFtrProviderContext } from '../../../../ftr_provi
|
|||
export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderContext) {
|
||||
const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantApi');
|
||||
describe('List connectors', function () {
|
||||
// Fails on MKI: https://github.com/elastic/kibana/issues/211175
|
||||
this.tags(['failsOnMKI']);
|
||||
|
||||
before(async () => {
|
||||
await observabilityAIAssistantAPIClient.deleteAllActionConnectors();
|
||||
});
|
||||
|
@ -35,7 +32,10 @@ export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderCon
|
|||
endpoint: 'GET /internal/observability_ai_assistant/connectors',
|
||||
});
|
||||
|
||||
expect(res.body.length).to.be(0);
|
||||
const connectorsExcludingPreconfiguredInference = res.body.filter(
|
||||
(c) => c.actionTypeId !== '.inference'
|
||||
);
|
||||
expect(connectorsExcludingPreconfiguredInference.length).to.be(0);
|
||||
});
|
||||
|
||||
it("returns the gen ai connector if it's been created", async () => {
|
||||
|
@ -47,7 +47,10 @@ export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderCon
|
|||
endpoint: 'GET /internal/observability_ai_assistant/connectors',
|
||||
});
|
||||
|
||||
expect(res.body.length).to.be(1);
|
||||
const connectorsExcludingPreconfiguredInference = res.body.filter(
|
||||
(c) => c.actionTypeId !== '.inference'
|
||||
);
|
||||
expect(connectorsExcludingPreconfiguredInference.length).to.be(1);
|
||||
|
||||
await observabilityAIAssistantAPIClient.deleteActionConnector({ actionId: connectorId });
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue