Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joemcelroy committed Aug 28, 2024
1 parent 89dad4f commit 27fad60
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('[Index management API Routes] fetch indices lib function', () => {

const getIndices = router.getMockESApiFn('indices.get');
const getIndicesStats = router.getMockESApiFn('indices.stats');
const getMetetringStats = router.getMockESApiFnAsSecondaryAuthUser('transport.request');
const getMeteringStats = router.getMockESApiFnAsSecondaryAuthUser('transport.request');
const mockRequest: RequestMock = {
method: 'get',
path: addBasePath('/indices'),
Expand All @@ -29,6 +29,11 @@ describe('[Index management API Routes] fetch indices lib function', () => {
beforeAll(() => {
registerIndicesRoutes({
...routeDependencies,
config: {
...routeDependencies.config,
isSizeAndDocCountEnabled: false,
isIndexStatsEnabled: true,
},
router,
});
});
Expand Down Expand Up @@ -179,7 +184,7 @@ describe('[Index management API Routes] fetch indices lib function', () => {
getIndices.mockResolvedValue({
regular_index: createTestIndexState(),
});
getMetetringStats.mockResolvedValue({
getMeteringStats.mockResolvedValue({
indices: [{ name: 'regular_index', num_docs: 100, size_in_bytes: 1000 }],
});

Expand Down

0 comments on commit 27fad60

Please sign in to comment.