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):
|
2023-02-28 16:49:32 +00:00
|
|
|
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*"])
|
2023-02-28 16:49:32 +00:00
|
|
|
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()
|