Allow running func tests while running containers with crowdsec (#2137)

Co-authored-by: Thibault "bui" Koechlin <thibault@crowdsec.net>
This commit is contained in:
mmetc 2023-03-24 10:19:22 +01:00 committed by GitHub
parent 3884c5f47d
commit bbfb7d1cfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,8 @@
#!/usr/bin/env bash
is_crowdsec_running() {
PIDS=$(pgrep -x 'crowdsec|crowdsec.test|crowdsec.cover')
# ignore processes in containers
PIDS=$(pgrep --ns $$ -x 'crowdsec|crowdsec.test|crowdsec.cover')
}
# The process can be slow, especially on CI and during test coverage.