Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavid committed Oct 4, 2024
1 parent 5411dca commit 67e4035
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
http = "localhost:8000"

[subscriber]
login = true
register = true
maxusers = 5
7 changes: 7 additions & 0 deletions caterva2/tests/caterva2-nologin.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[broker]
http = "localhost:8000"

[subscriber]
login = false
register = false
maxusers = 5
7 changes: 6 additions & 1 deletion caterva2/tests/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,15 @@ def _start_proc(self, name, *args, check=None):
f"check for service \"{name}\" succeeded before start"
f" (external service running?): {check.__name__}")

if os.environ.get('CATERVA2_SECRET'):
conf_file = 'caterva2-login.toml'
else:
conf_file = 'caterva2-nologin.toml'

popen_args = [
sys.executable,
f"-mcaterva2.services.{name[:3]}",
f"--conf={BASE_DIR / 'caterva2.toml'}",
f"--conf={BASE_DIR / conf_file}",
f"--statedir={self.state_dir / name}",
*([f"--http={check.host}"] if check else []),
*args
Expand Down

0 comments on commit 67e4035

Please sign in to comment.