File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Keboola \ManageApiTest ;
4
4
5
- use Keboola \ManageApi \ClientException ;
6
5
use Keboola \StorageApi \Workspaces ;
6
+ use Keboola \Test \Backend \Workspaces \Backend \WorkspaceBackendFactory ;
7
7
8
8
class ReaderAccountTest extends ClientTestCase
9
9
{
@@ -25,7 +25,8 @@ public function testCreateReaderAccount()
25
25
$ this ->assertEquals (sprintf ('Reader account for organization with ID "%s" already exists ' , $ organization ['id ' ]), $ e ->getMessage ());
26
26
}
27
27
28
- $ projectId = 118 ;
28
+ $ projectId = $ project ['id ' ];
29
+ // $projectId = 120;
29
30
// token without permissions
30
31
$ token = $ this ->client ->createProjectStorageToken ($ projectId , [
31
32
'description ' => 'test ' ,
@@ -37,7 +38,10 @@ public function testCreateReaderAccount()
37
38
'token ' => $ token ['token ' ],
38
39
]);
39
40
$ wsClient = new Workspaces ($ client );
40
- // $ws = $wsClient->createWorkspace(['async' => false]);
41
- $ ws = $ wsClient ->createWorkspace (['async ' => false , 'useCase ' => 'reader ' ]);
41
+ $ workspace = $ wsClient ->createWorkspace (['async ' => false , 'useCase ' => 'reader ' ]);
42
+
43
+
44
+ $ db = WorkspaceBackendFactory::createWorkspaceBackend ($ workspace );
45
+ $ db ->executeQuery ('select 1 ' );
42
46
}
43
47
}
You can’t perform that action at this time.
0 commit comments