github.com/crowdsecurity/crowdsec@v1.6.1/docker/test/tests/test_simple.py (about)

     1  #!/usr/bin/env python
     2  
     3  import pytest
     4  
     5  pytestmark = pytest.mark.docker
     6  
     7  
     8  # XXX this is redundant, already tested in pytest_cs
     9  def test_crowdsec(crowdsec, flavor):
    10      with crowdsec(flavor=flavor) as cs:
    11          for waiter in cs.log_waiters():
    12              with waiter as matcher:
    13                  matcher.fnmatch_lines(["*Starting processing data*"])
    14          res = cs.cont.exec_run('sh -c "echo $CI_TESTING"')
    15          assert res.exit_code == 0
    16          assert 'true' == res.output.decode().strip()