@@ -247,79 +247,6 @@ test('return error when manifest contains unrecognized properties', async () =>
247
247
} ) ;
248
248
} ) ;
249
249
250
- describe ( 'requiredOpenSearchPlugins' , ( ) => {
251
- test ( 'return error when plugin `requiredOpenSearchPlugins` is a string and not an array of string' , async ( ) => {
252
- mockReadFilePromise . mockResolvedValue (
253
- Buffer . from (
254
- JSON . stringify ( {
255
- id : 'id1' ,
256
- version : '7.0.0' ,
257
- server : true ,
258
- requiredOpenSearchPlugins : 'abc' ,
259
- } )
260
- )
261
- ) ;
262
-
263
- await expect ( parseManifest ( pluginPath , packageInfo , logger ) ) . rejects . toMatchObject ( {
264
- message : `The "requiredOpenSearchPlugins" in plugin manifest for "id1" should be an array of strings. (invalid-manifest, ${ pluginManifestPath } )` ,
265
- type : PluginDiscoveryErrorType . InvalidManifest ,
266
- path : pluginManifestPath ,
267
- } ) ;
268
- } ) ;
269
-
270
- test ( 'return error when `requiredOpenSearchPlugins` is not a string' , async ( ) => {
271
- mockReadFilePromise . mockResolvedValue (
272
- Buffer . from ( JSON . stringify ( { id : 'id2' , version : '7.0.0' , requiredOpenSearchPlugins : 2 } ) )
273
- ) ;
274
-
275
- await expect ( parseManifest ( pluginPath , packageInfo , logger ) ) . rejects . toMatchObject ( {
276
- message : `The "requiredOpenSearchPlugins" in plugin manifest for "id2" should be an array of strings. (invalid-manifest, ${ pluginManifestPath } )` ,
277
- type : PluginDiscoveryErrorType . InvalidManifest ,
278
- path : pluginManifestPath ,
279
- } ) ;
280
- } ) ;
281
-
282
- test ( 'return error when plugin requiredOpenSearchPlugins is an array that contains non-string values' , async ( ) => {
283
- mockReadFilePromise . mockResolvedValue (
284
- Buffer . from (
285
- JSON . stringify ( { id : 'id3' , version : '7.0.0' , requiredOpenSearchPlugins : [ 'plugin1' , 2 ] } )
286
- )
287
- ) ;
288
-
289
- await expect ( parseManifest ( pluginPath , packageInfo , logger ) ) . rejects . toMatchObject ( {
290
- message : `The "requiredOpenSearchPlugins" in plugin manifest for "id3" should be an array of strings. (invalid-manifest, ${ pluginManifestPath } )` ,
291
- type : PluginDiscoveryErrorType . InvalidManifest ,
292
- path : pluginManifestPath ,
293
- } ) ;
294
- } ) ;
295
-
296
- test ( 'Happy path when plugin `requiredOpenSearchPlugins` is an array of string' , async ( ) => {
297
- mockReadFilePromise . mockResolvedValue (
298
- Buffer . from (
299
- JSON . stringify ( {
300
- id : 'id1' ,
301
- version : '7.0.0' ,
302
- server : true ,
303
- requiredOpenSearchPlugins : [ 'plugin1' , 'plugin2' ] ,
304
- } )
305
- )
306
- ) ;
307
-
308
- await expect ( parseManifest ( pluginPath , packageInfo , logger ) ) . resolves . toEqual ( {
309
- id : 'id1' ,
310
- configPath : 'id_1' ,
311
- version : '7.0.0' ,
312
- opensearchDashboardsVersion : '7.0.0' ,
313
- optionalPlugins : [ ] ,
314
- requiredPlugins : [ ] ,
315
- requiredOpenSearchPlugins : [ 'plugin1' , 'plugin2' ] ,
316
- requiredBundles : [ ] ,
317
- server : true ,
318
- ui : false ,
319
- } ) ;
320
- } ) ;
321
- } ) ;
322
-
323
250
describe ( 'configPath' , ( ) => {
324
251
test ( 'falls back to plugin id if not specified' , async ( ) => {
325
252
mockReadFilePromise . mockResolvedValue (
@@ -374,7 +301,6 @@ test('set defaults for all missing optional fields', async () => {
374
301
opensearchDashboardsVersion : '7.0.0' ,
375
302
optionalPlugins : [ ] ,
376
303
requiredPlugins : [ ] ,
377
- requiredOpenSearchPlugins : [ ] ,
378
304
requiredBundles : [ ] ,
379
305
server : true ,
380
306
ui : false ,
@@ -391,7 +317,6 @@ test('return all set optional fields as they are in manifest', async () => {
391
317
opensearchDashboardsVersion : '7.0.0' ,
392
318
requiredPlugins : [ 'some-required-plugin' , 'some-required-plugin-2' ] ,
393
319
optionalPlugins : [ 'some-optional-plugin' ] ,
394
- requiredOpenSearchPlugins : [ 'test-opensearch-plugin-1' , 'test-opensearch-plugin-2' ] ,
395
320
ui : true ,
396
321
} )
397
322
)
@@ -405,7 +330,6 @@ test('return all set optional fields as they are in manifest', async () => {
405
330
optionalPlugins : [ 'some-optional-plugin' ] ,
406
331
requiredBundles : [ ] ,
407
332
requiredPlugins : [ 'some-required-plugin' , 'some-required-plugin-2' ] ,
408
- requiredOpenSearchPlugins : [ 'test-opensearch-plugin-1' , 'test-opensearch-plugin-2' ] ,
409
333
server : false ,
410
334
ui : true ,
411
335
} ) ;
@@ -420,7 +344,6 @@ test('return manifest when plugin expected OpenSearch Dashboards version matches
420
344
version : 'some-version' ,
421
345
opensearchDashboardsVersion : '7.0.0-alpha2' ,
422
346
requiredPlugins : [ 'some-required-plugin' ] ,
423
- requiredOpenSearchPlugins : [ ] ,
424
347
server : true ,
425
348
} )
426
349
)
@@ -433,7 +356,6 @@ test('return manifest when plugin expected OpenSearch Dashboards version matches
433
356
opensearchDashboardsVersion : '7.0.0-alpha2' ,
434
357
optionalPlugins : [ ] ,
435
358
requiredPlugins : [ 'some-required-plugin' ] ,
436
- requiredOpenSearchPlugins : [ ] ,
437
359
requiredBundles : [ ] ,
438
360
server : true ,
439
361
ui : false ,
@@ -461,7 +383,6 @@ test('return manifest when plugin expected OpenSearch Dashboards version is `ope
461
383
opensearchDashboardsVersion : 'opensearchDashboards' ,
462
384
optionalPlugins : [ ] ,
463
385
requiredPlugins : [ 'some-required-plugin' ] ,
464
- requiredOpenSearchPlugins : [ ] ,
465
386
requiredBundles : [ ] ,
466
387
server : true ,
467
388
ui : true ,
0 commit comments