Skip to content

Commit

Permalink
testdrive: add possible params
Browse files Browse the repository at this point in the history
  • Loading branch information
nrainer-materialize committed Jan 10, 2024
1 parent d22c443 commit 8194915
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions misc/python/materialize/mzcompose/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,8 @@ def testdrive(
args: list[str] = [],
caller: Traceback | None = None,
mz_service: str | None = None,
default_timeout: str = "300s",
no_reset: bool = False,
) -> None:
"""Run a string as a testdrive script.
Expand All @@ -1036,6 +1038,12 @@ def testdrive(
caller = caller or getframeinfo(stack()[1][0])
args = args + [f"--source={caller.filename}:{caller.lineno}"]

if default_timeout is not None:
args += [f"--default-timeout={default_timeout}"]

if no_reset:
args += ["--no-reset"]

if mz_service is not None:
args += [
f"--materialize-url=postgres://materialize@{mz_service}:6875",
Expand Down

0 comments on commit 8194915

Please sign in to comment.