Open LaurenceJJones opened 2 months ago
@LaurenceJJones: Thanks for opening an issue, it is currently awaiting triage.
In the meantime, you can:
@LaurenceJJones: There are no 'kind' label on this issue. You need a 'kind' label to start the triage process.
/kind feature
/kind enhancement
/kind refactoring
/kind bug
/kind packaging
``` apt update \ && apt install -y gettext curl wget git libsqlite3-0 cd $(mktemp -d) wget https://github.com/crowdsecurity/crowdsec/releases/download/v1.6.2/crowdsec-release.tgz tar xvzf crowdsec-release.tgz cd crowdsec-v1.6.2 ./test_env.sh export PATH=$PATH:"$PWD/cmd/crowdsec-cli/":"$PWD/cmd/crowdsec/" alias csdev="$PWD/cmd/crowdsec-cli/cscli -c $PWD/config/dev.yaml" git clone https://github.com/crowdsecurity/hub export PATH=$PATH:"$PWD/cmd/crowdsec/":"$PWD/cmd/crowdsec-cli/" cd hub csdev hubtest run --all ```
With this environment, we got the same error as described in [cscli] We added patterns_dir option to config.yaml but isnt used in hubtest
On my test environment, config_paths.pattern_dir
is not set.
root@05391e978e44:/tmp/tmp.MqISOY3GSv/crowdsec-v1.6.2/hub# csdev hubtest run --all
+ /tmp/tmp.MqISOY3GSv/crowdsec-v1.6.2/cmd/crowdsec-cli/cscli -c /tmp/tmp.MqISOY3GSv/crowdsec-v1.6.2/config/dev.yaml hubtest run --all
INFO Running test 'CVE-2017-9841'
ERRO running test 'CVE-2017-9841' failed: unable to copy 'patterns' from '/etc/crowdsec/patterns' to '/tmp/tmp.MqISOY3GSv/crowdsec-v1.6.2/hub/.tests/CVE-2017-9841/runtime/patterns': open /etc/crowdsec/patterns: no such file or directory
INFO Running test 'CVE-2019-18935'
ERRO running test 'CVE-2019-18935' failed: unable to copy 'patterns' from '/etc/crowdsec/patterns' to '/tmp/tmp.MqISOY3GSv/crowdsec-v1.6.2/hub/.tests/CVE-2019-18935/runtime/patterns': open /etc/crowdsec/patterns: no such file or directory
INFO Running test 'CVE-2021-4034'
ERRO running test 'CVE-2021-4034' failed: unable to copy 'patterns' from '/etc/crowdsec/patterns' to '/tmp/tmp.MqISOY3GSv/crowdsec-v1.6.2/hub/.tests/CVE-2021-4034/runtime/patterns': open /etc/crowdsec/patterns: no such file or directory
...
I assume that behavior could be disruptive when testing:
Note: I expect the test environment to be isolated from any pre-existing installations, ensuring that the results are not influenced by previously installed versions.
What would you like to be added?
Currently if a user wants to download a test environment its pretty hard to get it configured correctly here are the issue:
hubtest
andexplain
evoke CrowdSec from path and this may not be the case for test environments/kind enhancement
Why is this needed?
Easier to setup a dev / test environment