crowdsec/docker/test/tests/test_simple.py
mmetc 0a114ca7d1
Fix docker tests by increasing timeout (again) and move compose test to plugin (#2112)
* Fix docker tests by increasing timeout (again) and move compose test to plugin

* Bump workflow timeout to 30 min

* Test only alpine-slim and debian-full flavors
2023-03-09 12:00:29 +01:00

16 lines
494 B
Python

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