Skip to content

Commit 949e64f

Browse files
committed
create ws
1 parent 607af87 commit 949e64f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/ReaderAccountTest.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Keboola\ManageApiTest;
44

5-
use Keboola\ManageApi\ClientException;
65
use Keboola\StorageApi\Workspaces;
6+
use Keboola\Test\Backend\Workspaces\Backend\WorkspaceBackendFactory;
77

88
class ReaderAccountTest extends ClientTestCase
99
{
@@ -25,7 +25,8 @@ public function testCreateReaderAccount()
2525
$this->assertEquals(sprintf('Reader account for organization with ID "%s" already exists', $organization['id']), $e->getMessage());
2626
}
2727

28-
$projectId = 118;
28+
$projectId = $project['id'];
29+
// $projectId = 120;
2930
// token without permissions
3031
$token = $this->client->createProjectStorageToken($projectId, [
3132
'description' => 'test',
@@ -37,7 +38,10 @@ public function testCreateReaderAccount()
3738
'token' => $token['token'],
3839
]);
3940
$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');
4246
}
4347
}

0 commit comments

Comments
 (0)