Skip to content

Commit 431526c

Browse files
authored
Merge pull request #75 from DataKitchen/TG-921
misc: consolidate quickstart command
2 parents 8d15066 + 3677bd7 commit 431526c

2 files changed

Lines changed: 3 additions & 47 deletions

File tree

dk-installer.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2309,7 +2309,6 @@ def execute(self, args):
23092309
quick_start_command = [
23102310
"testgen",
23112311
"quick-start",
2312-
"--delete-target-db",
23132312
]
23142313
if args.obs_export:
23152314
with open(self.data_folder / DEMO_CONFIG_FILE, "r") as file:
@@ -2326,41 +2325,7 @@ def execute(self, args):
23262325

23272326
cli_commands = [
23282327
quick_start_command,
2329-
[
2330-
"testgen",
2331-
"run-profile",
2332-
"--table-group-id",
2333-
"0ea85e17-acbe-47fe-8394-9970725ad37d",
2334-
],
2335-
[
2336-
"testgen",
2337-
"run-test-generation",
2338-
"--table-group-id",
2339-
"0ea85e17-acbe-47fe-8394-9970725ad37d",
2340-
],
2341-
[
2342-
"testgen",
2343-
"run-tests",
2344-
"--project-key",
2345-
"DEFAULT",
2346-
"--test-suite-key",
2347-
"default-suite-1",
2348-
],
23492328
]
2350-
if args.obs_export:
2351-
cli_commands.append(
2352-
[
2353-
"testgen",
2354-
"export-observability",
2355-
"--project-key",
2356-
"DEFAULT",
2357-
"--test-suite-key",
2358-
"default-suite-1",
2359-
]
2360-
)
2361-
2362-
cli_commands.append(["testgen", "quick-start", "--simulate-fast-forward"])
2363-
23642329
if args.obs_export:
23652330
cli_commands.append(
23662331
[

tests/test_tg_run_demo.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,13 @@ def test_tg_run_demo(obs_export, tg_run_demo_action, args_mock, start_cmd_mock,
2323

2424
compose_args = ("docker", "compose", "-f", compose_path, "exec", "engine", "testgen")
2525
kwargs = dict(raise_on_non_zero=True, env=None)
26-
expected_calls = [
27-
call(*compose_args, "run-profile", "--table-group-id", "0ea85e17-acbe-47fe-8394-9970725ad37d", **kwargs),
28-
call(
29-
*compose_args, "run-test-generation", "--table-group-id", "0ea85e17-acbe-47fe-8394-9970725ad37d", **kwargs
30-
),
31-
call(*compose_args, "run-tests", "--project-key", "DEFAULT", "--test-suite-key", "default-suite-1", **kwargs),
32-
call(*compose_args, "quick-start", "--simulate-fast-forward", **kwargs),
33-
]
3426

3527
if obs_export:
3628
demo_cfg_path = request.getfixturevalue("demo_config_path")
37-
expected_calls += [
29+
expected_calls = [
3830
call(
3931
*compose_args,
4032
"quick-start",
41-
"--delete-target-db",
4233
"--observability-api-url",
4334
"demo-api-host",
4435
"--observability-api-key",
@@ -71,8 +62,8 @@ def test_tg_run_demo(obs_export, tg_run_demo_action, args_mock, start_cmd_mock,
7162
),
7263
]
7364
else:
74-
expected_calls += [
75-
call(*compose_args, "quick-start", "--delete-target-db", **kwargs),
65+
expected_calls = [
66+
call(*compose_args, "quick-start", **kwargs),
7667
]
7768

7869
tg_run_demo_action.execute()

0 commit comments

Comments
 (0)