|
6 | 6 |
|
7 | 7 | import { inflateSync } from 'zlib'; |
8 | 8 | import { savedObjectsClientMock } from 'src/core/server/mocks'; |
| 9 | +import { createPackageConfigServiceMock } from '../../../../../../ingest_manager/server/mocks'; |
9 | 10 | import { |
10 | 11 | ArtifactConstants, |
11 | 12 | ManifestConstants, |
12 | 13 | Manifest, |
13 | 14 | ExceptionsCache, |
14 | 15 | } from '../../../lib/artifacts'; |
15 | | -import { getPackageConfigServiceMock, getManifestManagerMock } from './manifest_manager.mock'; |
| 16 | +import { getManifestManagerMock } from './manifest_manager.mock'; |
16 | 17 |
|
17 | 18 | describe('manifest_manager', () => { |
18 | 19 | describe('ManifestManager sanity checks', () => { |
@@ -73,15 +74,15 @@ describe('manifest_manager', () => { |
73 | 74 | }); |
74 | 75 |
|
75 | 76 | test('ManifestManager can dispatch manifest', async () => { |
76 | | - const packageConfigService = getPackageConfigServiceMock(); |
| 77 | + const packageConfigService = createPackageConfigServiceMock(); |
77 | 78 | const manifestManager = getManifestManagerMock({ packageConfigService }); |
78 | 79 | const snapshot = await manifestManager.getSnapshot(); |
79 | 80 | const dispatched = await manifestManager.dispatch(snapshot!.manifest); |
80 | 81 | expect(dispatched).toEqual([]); |
81 | 82 | const entries = snapshot!.manifest.getEntries(); |
82 | 83 | const artifact = Object.values(entries)[0].getArtifact(); |
83 | 84 | expect( |
84 | | - packageConfigService.update.mock.calls[0][2].inputs[0].config.artifact_manifest.value |
| 85 | + packageConfigService.update.mock.calls[0][2].inputs[0].config!.artifact_manifest.value |
85 | 86 | ).toEqual({ |
86 | 87 | manifest_version: ManifestConstants.INITIAL_VERSION, |
87 | 88 | schema_version: 'v1', |
|
0 commit comments