Skip to content

Commit 82da2e4

Browse files
committed
Minor fixes based on copilot review
1 parent a29d96d commit 82da2e4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

singlestoredb/pytest.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def __init__(self) -> None:
122122

123123
self.root_password = 'Q8r4D7yXR8oqn'
124124
self.environment_vars = {
125-
'SINGLESTORE_LICENSE': None,
125+
'SINGLESTORE_LICENSE': license,
126126
'ROOT_PASSWORD': f"\"{self.root_password}\"",
127127
'SINGLESTORE_SET_GLOBAL_DEFAULT_PARTITIONS_PER_LEAF': '1',
128128
}
@@ -202,7 +202,7 @@ def start(self) -> None:
202202
f'{self.http_port}, {self.studio_port}',
203203
)
204204
try:
205-
license = os.environ['SINGLESTORE_LICENSE']
205+
license = os.environ.get('SINGLESTORE_LICENSE', '')
206206
env = {
207207
'SINGLESTORE_LICENSE': license,
208208
}
@@ -211,6 +211,7 @@ def start(self) -> None:
211211
command, shell=True, env=env,
212212
stdout=subprocess.DEVNULL,
213213
)
214+
214215
except Exception as e:
215216
logger.exception(e)
216217
raise RuntimeError(
@@ -292,6 +293,7 @@ def stop(self) -> None:
292293
shell=True,
293294
stdout=subprocess.DEVNULL,
294295
)
296+
295297
except Exception as e:
296298
logger.exception(e)
297299
raise RuntimeError('Failed to stop container.') from e
@@ -303,9 +305,10 @@ def stop(self) -> None:
303305
shell=True,
304306
stdout=subprocess.DEVNULL,
305307
)
308+
306309
except Exception as e:
307310
logger.exception(e)
308-
raise RuntimeError('Failed to stop container.') from e
311+
raise RuntimeError('Failed to remove container.') from e
309312

310313

311314
@pytest.fixture(scope='session')

0 commit comments

Comments
 (0)