Skip to content

Commit

Permalink
add alerting start method and rule details to observability AI assist…
Browse files Browse the repository at this point in the history
…ant tests
  • Loading branch information
arturoliduena committed Jan 23, 2025
1 parent ddf4c61 commit 8d79ec4
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ describe('observabilityAIAssistant rule_connector', () => {
};
},
},
alerting: {
start: async () => {
return {
getRulesClientWithRequest: jest.fn().mockResolvedValue({
async get() {
return { createdBy: 'user_1' };
},
}),
};
},
},
},
} as unknown as ObservabilityAIAssistantRouteHandlerResources);

Expand All @@ -127,6 +138,7 @@ describe('observabilityAIAssistant rule_connector', () => {
message: 'hello',
connector: 'azure-open-ai',
alerts: { new: [{ _id: 'new_alert' }], recovered: [] },
rule: { id: 'foo', name: 'bar' },
},
} as unknown as ObsAIAssistantConnectorTypeExecutorOptions);

Expand Down

0 comments on commit 8d79ec4

Please sign in to comment.