Skip to content

Commit

Permalink
avoid permission issue on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
ProKil committed Jun 24, 2024
1 parent 95a1412 commit a11bc16
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions tests/cli/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,41 @@


def test_install() -> None:
result = runner.invoke(
app,
["install", "--no-use-docker", "--load-database", "--overwrite-existing-data"],
)
assert result.exit_code == 0
time.sleep(1)

if platform.system() == "Darwin":
result = runner.invoke(
app,
["install", "--no-use-docker", "--overwrite-existing-data"],
)
assert result.exit_code == 0
time.sleep(1)
subprocess.run("redis-cli shutdown", shell=True, check=True)
elif platform.system() == "Linux":
result = runner.invoke(
app,
[
"install",
"--no-use-docker",
"--load-database",
"--overwrite-existing-data",
],
)
assert result.exit_code == 0
time.sleep(1)
subprocess.run(
"./redis-stack-server-7.2.0-v10/bin/redis-cli shutdown",
shell=True,
check=True,
)

result = runner.invoke(app, ["install"], input="No\nNo\n")
assert result.exit_code == 0
time.sleep(1)
if platform.system() == "Darwin":
result = runner.invoke(app, ["install"], input="Yes\nNo\n\n")
assert result.exit_code == 0
time.sleep(1)
subprocess.run("redis-cli shutdown", shell=True, check=True)
elif platform.system() == "Linux":
result = runner.invoke(app, ["install"], input="No\nNo\n")
assert result.exit_code == 0
time.sleep(1)
subprocess.run(
"./redis-stack-server-7.2.0-v10/bin/redis-cli shutdown",
shell=True,
Expand Down

0 comments on commit a11bc16

Please sign in to comment.