Skip to content

Commit

Permalink
rm from test files
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Oct 10, 2024
1 parent a37e905 commit 08b032d
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ describe('helpers', () => {
langChainTimeout,
llm,
logger: mockLogger,
modelExists: false,
onNewReplacements,
replacements: latestReplacements,
request: mockRequest,
Expand Down Expand Up @@ -231,7 +230,6 @@ describe('helpers', () => {
langChainTimeout,
llm,
logger: mockLogger,
modelExists: false,
onNewReplacements,
replacements: latestReplacements,
request: mockRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ describe('AlertCountsTool', () => {
} as unknown as KibanaRequest<unknown, unknown, ExecuteConnectorRequestBody>;
const isEnabledKnowledgeBase = true;
const chain = {} as unknown as RetrievalQAChain;
const modelExists = true;
const logger = loggerMock.create();
const rest = {
isEnabledKnowledgeBase,
chain,
logger,
modelExists,
};

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ describe('AttackDiscoveryTool', () => {
isEnabledKnowledgeBase: false,
llm,
logger,
modelExists: false,
onNewReplacements: jest.fn(),
size,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ describe('NaturalLanguageESQLTool', () => {
inference,
connectorId,
isEnabledKnowledgeBase: true,
modelExists: true,
};

describe('isSupported', () => {
Expand All @@ -53,8 +52,6 @@ describe('NaturalLanguageESQLTool', () => {
describe('getTool', () => {
it('returns null if inference plugin is not provided', () => {
const tool = NL_TO_ESQL_TOOL.getTool({
isEnabledKnowledgeBase: true,
modelExists: true,
...rest,
inference: undefined,
});
Expand All @@ -64,19 +61,15 @@ describe('NaturalLanguageESQLTool', () => {

it('returns null if connectorId is not provided', () => {
const tool = NL_TO_ESQL_TOOL.getTool({
isEnabledKnowledgeBase: true,
modelExists: true,
...rest,
connectorId: undefined,
});

expect(tool).toBeNull();
});

it('should return a Tool instance if isEnabledKnowledgeBase and modelExists are true', () => {
it('should return a Tool instance when given required properties', () => {
const tool = NL_TO_ESQL_TOOL.getTool({
isEnabledKnowledgeBase: true,
modelExists: true,
...rest,
});

Expand All @@ -85,8 +78,6 @@ describe('NaturalLanguageESQLTool', () => {

it('should return a tool with the expected tags', () => {
const tool = NL_TO_ESQL_TOOL.getTool({
isEnabledKnowledgeBase: true,
modelExists: true,
...rest,
}) as DynamicTool;

Expand All @@ -95,8 +86,6 @@ describe('NaturalLanguageESQLTool', () => {

it('should return tool with the expected description for OSS model', () => {
const tool = NL_TO_ESQL_TOOL.getTool({
isEnabledKnowledgeBase: true,
modelExists: true,
isOssModel: true,
...rest,
}) as DynamicTool;
Expand All @@ -106,8 +95,6 @@ describe('NaturalLanguageESQLTool', () => {

it('should return tool with the expected description for non-OSS model', () => {
const tool = NL_TO_ESQL_TOOL.getTool({
isEnabledKnowledgeBase: true,
modelExists: true,
isOssModel: false,
...rest,
}) as DynamicTool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ describe('OpenAndAcknowledgedAlertsTool', () => {
} as unknown as KibanaRequest<unknown, unknown, ExecuteConnectorRequestBody>;
const isEnabledKnowledgeBase = true;
const chain = {} as unknown as RetrievalQAChain;
const modelExists = true;
const logger = loggerMock.create();
const rest = {
isEnabledKnowledgeBase,
esClient,
chain,
logger,
modelExists,
};

const anonymizationFields = [
Expand Down

0 comments on commit 08b032d

Please sign in to comment.