-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
savedObjectTagging: use
importExport
instead of esArchiver
for FT…
…R tests (#135679) * migrate most of the datasets * update the tagging_api suite * update the security_and_spaces suite * adapt the functional suite
- Loading branch information
1 parent
96048fa
commit dc78287
Showing
44 changed files
with
1,314 additions
and
3,993 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/test_utils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrProviderContext } from '../services'; | ||
|
||
export const createTestSpaces = async ({ getService }: FtrProviderContext) => { | ||
const spaceService = getService('spaces'); | ||
await spaceService.create({ | ||
id: 'space_1', | ||
name: 'Space 1', | ||
description: 'This is the first test space', | ||
}); | ||
await spaceService.create({ | ||
id: 'space_2', | ||
name: 'Space 2', | ||
description: 'This is the second test space', | ||
}); | ||
}; | ||
|
||
export const deleteTestSpaces = async ({ getService }: FtrProviderContext) => { | ||
const spaceService = getService('spaces'); | ||
await spaceService.delete('space_1'); | ||
await spaceService.delete('space_2'); | ||
}; | ||
|
||
export const createTags = async ({ getService }: FtrProviderContext) => { | ||
const kibanaServer = getService('kibanaServer'); | ||
await kibanaServer.importExport.load( | ||
'x-pack/test/saved_object_tagging/common/fixtures/es_archiver/rbac_tags/default_space.json' | ||
); | ||
await kibanaServer.importExport.load( | ||
'x-pack/test/saved_object_tagging/common/fixtures/es_archiver/rbac_tags/space_1.json', | ||
{ space: 'space_1' } | ||
); | ||
}; | ||
|
||
export const deleteTags = async ({ getService }: FtrProviderContext) => { | ||
const kibanaServer = getService('kibanaServer'); | ||
await kibanaServer.importExport.unload( | ||
'x-pack/test/saved_object_tagging/common/fixtures/es_archiver/rbac_tags/default_space.json' | ||
); | ||
await kibanaServer.importExport.unload( | ||
'x-pack/test/saved_object_tagging/common/fixtures/es_archiver/rbac_tags/space_1.json', | ||
{ space: 'space_1' } | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.