Skip to content

Commit

Permalink
fix getFlatSettings() request
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed Jan 28, 2021
1 parent 80b720d commit 24d46c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ describe('ReindexActions', () => {
} as RequestEvent<T>);

it('returns flat settings', async () => {
clusterClient.asCurrentUser.indices.getSettings.mockResolvedValueOnce(
clusterClient.asCurrentUser.indices.get.mockResolvedValueOnce(
asApiResponse({
myIndex: {
settings: { 'index.mySetting': '1' },
Expand All @@ -306,7 +306,7 @@ describe('ReindexActions', () => {
});

it('returns null if index does not exist', async () => {
clusterClient.asCurrentUser.indices.getSettings.mockResolvedValueOnce(asApiResponse({}));
clusterClient.asCurrentUser.indices.get.mockResolvedValueOnce(asApiResponse({}));
await expect(actions.getFlatSettings('myIndex')).resolves.toBeNull();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export const reindexActionsFactory = (
},

async getFlatSettings(indexName: string) {
const { body: flatSettings } = await esClient.indices.getSettings<{
const { body: flatSettings } = await esClient.indices.get<{
[indexName: string]: FlatSettings;
}>({
index: indexName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ describe('reindexService', () => {
});

it('fails if create index is not acknowledged', async () => {
clusterClient.asCurrentUser.indices.getSettings.mockResolvedValueOnce(
clusterClient.asCurrentUser.indices.get.mockResolvedValueOnce(
asApiResponse({ myIndex: settingsMappings })
);

Expand All @@ -844,7 +844,7 @@ describe('reindexService', () => {
});

it('fails if create index fails', async () => {
clusterClient.asCurrentUser.indices.getSettings.mockResolvedValueOnce(
clusterClient.asCurrentUser.indices.get.mockResolvedValueOnce(
asApiResponse({ myIndex: settingsMappings })
);

Expand Down

0 comments on commit 24d46c5

Please sign in to comment.