Skip to content

Commit

Permalink
Fix TS errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Oct 7, 2021
1 parent 90c4743 commit 6c7d40f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Cluster upgrade', () => {
});

test('renders overview', () => {
const { exists, find } = testBed;
const { exists } = testBed;
expect(exists('overview')).toBe(true);
expect(exists('isUpgradingMessage')).toBe(false);
expect(exists('isUpgradeCompleteMessage')).toBe(false);
Expand All @@ -38,8 +38,9 @@ describe('Cluster upgrade', () => {

describe('when cluster is in the process of a rolling upgrade', () => {
beforeEach(async () => {
httpRequestsMockHelpers.setLoadDeprecationLoggingResponse(null, {
httpRequestsMockHelpers.setLoadDeprecationLoggingResponse(undefined, {
statusCode: 426,
message: '',
attributes: {
allNodesUpgraded: false,
},
Expand All @@ -61,8 +62,9 @@ describe('Cluster upgrade', () => {

describe('when cluster has been upgraded', () => {
beforeEach(async () => {
httpRequestsMockHelpers.setLoadDeprecationLoggingResponse(null, {
httpRequestsMockHelpers.setLoadDeprecationLoggingResponse(undefined, {
statusCode: 426,
message: '',
attributes: {
allNodesUpgraded: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { AppContextProvider } from '../../../public/application/app_context';
import { apiService } from '../../../public/application/lib/api';
import { breadcrumbService } from '../../../public/application/lib/breadcrumbs';
import { GlobalFlyout } from '../../../public/shared_imports';
import { AppContextDependencies } from '../../../public/types';
import { AppDependencies } from '../../../public/types';
import { getAppContextMock } from './app_context.mock';
import { init as initHttpRequests } from './http_requests';

Expand All @@ -39,7 +39,7 @@ export const WithAppDependencies =
apiService.setup(mockHttpClient as unknown as HttpSetup);
breadcrumbService.setup(() => '');

const appContextMock = getAppContextMock() as unknown as AppContextDependencies;
const appContextMock = getAppContextMock() as unknown as AppDependencies;

return (
<AuthorizationContext.Provider
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/upgrade_assistant/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ export const DEPRECATION_LOGS_SOURCE_ID = 'deprecation_logs';
export const DEPRECATION_LOGS_INDEX = '.logs-deprecation.elasticsearch-default';
export const DEPRECATION_LOGS_INDEX_PATTERN = '.logs-deprecation.elasticsearch-default';

export const CLUSTER_UPGRADE_STATUS_POLL_INTERVAL_MS = 45000;
export const CLOUD_BACKUP_STATUS_POLL_INTERVAL_MS = 60000;
export const DEPRECATION_LOGS_COUNT_POLL_INTERVAL_MS = 15000;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import React, { useEffect, useState, useCallback } from 'react';
import React, { useEffect, useState } from 'react';
import { Router, Switch, Route, Redirect } from 'react-router-dom';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiEmptyPrompt, EuiPageContent } from '@elastic/eui';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { useState, useEffect } from 'react';
import { i18n } from '@kbn/i18n';

import { ResponseError } from '../../../../../common/types';
import { AppContextDependencies } from '../../../../types';
import { useAppContext } from '../../../app_context';
import { DeprecationLoggingPreviewProps } from '../../types';

Expand Down

0 comments on commit 6c7d40f

Please sign in to comment.