Skip to content

Commit fa5091c

Browse files
authored
fix(free-tier): starter workspace tests (#76)
1 parent 8a109ad commit fa5091c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

singlestoredb/management/workspace.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,7 +1866,7 @@ def create_starter_workspace(
18661866
database_name : str
18671867
Name of the database for the starter workspace
18681868
workspace_group : dict[str, str]
1869-
Workspace group input (dict with keys: 'cell_id')
1869+
Workspace group input (dict with keys: 'cell_id' and 'name').
18701870
18711871
Returns
18721872
-------
@@ -1875,15 +1875,16 @@ def create_starter_workspace(
18751875
if not workspace_group or not isinstance(workspace_group, dict):
18761876
raise ValueError(
18771877
'workspace_group must be a dict with keys: '
1878-
"'cell_id'",
1878+
"'cell_id' and 'name'",
18791879
)
1880-
if set(workspace_group.keys()) != {'cell_id'}:
1881-
raise ValueError("workspace_group must contain only 'cell_id'")
1880+
if set(workspace_group.keys()) != {'cell_id', 'name'}:
1881+
raise ValueError("workspace_group must contain only 'cell_id' and 'name'")
18821882

18831883
payload = {
18841884
'name': name,
18851885
'databaseName': database_name,
18861886
'workspaceGroup': {
1887+
'name': workspace_group['name'],
18871888
'cellID': workspace_group['cell_id'],
18881889
},
18891890
}

singlestoredb/tests/test_management.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ def setUpClass(cls):
399399
f'starter-ws-test-{name}',
400400
database_name=f'starter_db_{name}',
401401
workspace_group={
402+
'name': f'starter-wg-test-{name}',
402403
'cell_id': random.choice(us_regions).id,
403404
},
404405
)

0 commit comments

Comments
 (0)