crowdsec/docker/test/tests/test_simple.py

17 lines
473 B
Python
Raw Normal View History

2023-02-20 13:55:56 +00:00
#!/usr/bin/env python
import pytest
pytestmark = pytest.mark.docker
# XXX this is redundant, already tested in pytest_cs
def test_crowdsec(crowdsec):
with crowdsec() as cs:
for waiter in cs.log_waiters():
2023-02-20 13:55:56 +00:00
with waiter as matcher:
matcher.fnmatch_lines(["*Starting processing data*"])
res = cs.cont.exec_run('sh -c "echo $CI_TESTING"')
2023-02-20 13:55:56 +00:00
assert res.exit_code == 0
assert 'true' == res.output.decode().strip()