Skip to content

Commit cc8d801

Browse files
committed
wip
1 parent afae74c commit cc8d801

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/tests/install/no_crowdsec/test_no_crowdsec_scripts.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010

1111

1212
@pytest.mark.dependency
13-
def test_install_no_crowdsec(project_repo, bouncer_binary, must_be_root):
13+
def test_install_no_crowdsec(project_repo, bouncer_binary, tmp_path, must_be_root):
1414
c = pexpect.spawn("/usr/bin/sh", ["scripts/install.sh"], cwd=project_repo)
1515

16+
foo = tmp_path / "foo"
17+
foo.touch()
18+
1619
c.expect("Path to your custom binary:")
17-
c.sendline("/path/to/binary")
20+
c.sendline(foo.as_posix())
1821
c.expect(f"Installing {BOUNCER}")
1922
c.expect("WARN.* cscli not found, you will need to generate an api key.")
2023
c.expect(f"WARN.* service not started. You need to get an API key and configure it in {CONFIG}")
@@ -26,7 +29,7 @@ def test_install_no_crowdsec(project_repo, bouncer_binary, must_be_root):
2629
with Path(CONFIG).open() as f:
2730
y = yaml.safe_load(f)
2831
assert y["api_key"] == "<API_KEY>"
29-
assert y["bin_path"] == "/path/to/binary"
32+
assert y["bin_path"] == foo.as_posix()
3033

3134
assert os.path.exists(CONFIG)
3235
assert os.stat(CONFIG).st_mode & 0o777 == 0o600

0 commit comments

Comments
 (0)