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

     1  #!/usr/bin/env python
     2  
     3  from pytest_cs import Status
     4  
     5  import pytest
     6  
     7  pytestmark = pytest.mark.docker
     8  
     9  
    10  def test_no_agent(crowdsec, flavor):
    11      """Test DISABLE_LOCAL_API=true (failing stand-alone container)"""
    12      env = {
    13          'DISABLE_LOCAL_API': 'true',
    14      }
    15  
    16      # if an alternative lapi url is not defined, the container should exit
    17  
    18      with crowdsec(flavor=flavor, environment=env, wait_status=Status.EXITED) as cs:
    19          cs.wait_for_log("*dial tcp 0.0.0.0:8080: connect: connection refused*")