Adding upstream version 1.9.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
2bf0435a35
commit
031879240c
356 changed files with 26924 additions and 0 deletions
25
tests/cli_tests/test_config.py
Normal file
25
tests/cli_tests/test_config.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
import pexpect
|
||||
from textwrap import dedent
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def test_log_location_config():
|
||||
config_content = dedent(
|
||||
"""
|
||||
[main]
|
||||
log_location = /tmp/iredis1.log
|
||||
"""
|
||||
)
|
||||
with open("/tmp/iredisrc", "w+") as etc_config:
|
||||
etc_config.write(config_content)
|
||||
|
||||
cli = pexpect.spawn("iredis -n 15 --iredisrc /tmp/iredisrc", timeout=1)
|
||||
cli.expect("127.0.0.1")
|
||||
cli.close()
|
||||
|
||||
log = Path("/tmp/iredis1.log")
|
||||
assert log.exists()
|
||||
with open(log, "r") as logfile:
|
||||
content = logfile.read()
|
||||
|
||||
assert len(content) > 100
|
Loading…
Add table
Add a link
Reference in a new issue