File tree 2 files changed +12
-1
lines changed
cypress/integration/core-opensearch-dashboards/opensearch-dashboards/workspace-plugin
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 22
22
with :
23
23
test-name : dashboards workspace
24
24
test-command : env CYPRESS_WORKSPACE_ENABLED=true yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/workspace-plugin/*'
25
- osd-serve-args : --workspace.enabled=true --savedObjects.permission.enabled=true
25
+ osd-serve-args : --workspace.enabled=true --savedObjects.permission.enabled=true --opensearch_security.multitenancy.enabled=false
26
26
tests-without-security :
27
27
needs : changes
28
28
if : ${{ needs.changes.outputs.tests == 'true' }}
Original file line number Diff line number Diff line change 6
6
import { BASE_PATH } from '../../../../utils/constants' ;
7
7
8
8
if ( Cypress . env ( 'WORKSPACE_ENABLED' ) ) {
9
+ let workspaceId ;
9
10
describe ( 'Workspace CRUD APIs' , ( ) => {
10
11
describe ( 'Create a workspace' , ( ) => {
11
12
it ( 'should successfully create a worksapce' , ( ) => {
@@ -24,9 +25,19 @@ if (Cypress.env('WORKSPACE_ENABLED')) {
24
25
body : body ,
25
26
} ) . as ( 'createWorkspace' ) ;
26
27
cy . get ( '@createWorkspace' ) . should ( ( res ) => {
28
+ workspaceId = res . body . result . id ;
27
29
expect ( res . body . success ) . to . eql ( true ) ;
28
30
} ) ;
29
31
} ) ;
30
32
} ) ;
33
+ after ( ( ) => {
34
+ cy . request ( {
35
+ method : 'DELETE' ,
36
+ url : `${ BASE_PATH } /api/workspaces/${ workspaceId } ` ,
37
+ headers : {
38
+ 'osd-xsrf' : true ,
39
+ } ,
40
+ } ) ;
41
+ } ) ;
31
42
} ) ;
32
43
}
You can’t perform that action at this time.
0 commit comments