docs(test): run locally handling python deps with venv

Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
Leonardo Di Donato 2020-05-25 09:13:45 +00:00 committed by poiana
parent 6eb9b1add1
commit 3bfd94fefd
4 changed files with 40 additions and 7 deletions

View File

@ -30,7 +30,7 @@ How to use.
How to build. How to build.
* cd docker/builder && DOCKER_BUILDKIT=1 docker build -t falcosecurity/falco-tester . * cd docker/tester && DOCKER_BUILDKIT=1 docker build -t falcosecurity/falco-tester .
Environment. Environment.

View File

@ -1,6 +1,39 @@
# Falco Regression tests # Falco regression tests
This folder contains the Regression tests suite for Falco. This folder contains the Regression tests suite for Falco.
You can find instructions on how to run this test suite on the Falco website [here](https://falco.org/docs/source/#run-regression-tests). You can find instructions on how to run this test suite on the Falco website [here](https://falco.org/docs/source/#run-regression-tests).
## Test suites
- [falco_tests](./falco_tests.yaml)
- [falco_traces](./falco_traces.yaml)
- [falco_tests_package](./falco_tests_package.yaml)
- [falco_k8s_audit_tests](./falco_k8s_audit_tests.yaml)
- [falco_tests_psp](./falco_tests_psp.yaml)
## Running locally
Using `virtualenv` the steps to locally run a specific test suite are the following ones (from this directory):
```console
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
BUILD_DIR="../build" avocado run --mux-yaml falco_tests.yaml --job-results-dir /tmp/job-results -- falco_test.py
deactivate
```
The name of the specific test suite to run is `falco_tests.yaml` in this case. Change it to run others test suites.
In case you want to only execute a specific test case, use the `--mux-filter-only` parameter as follows:
```console
BUILD_DIR="../build" avocado run --mux-yaml falco_tests.yaml --job-results-dir /tmp/job-results --mux-filter-only /run/trace_files/program_output -- falco_test.py
```
To obtain the path of all the available variants, execute:
```console
avocado variants --mux-yaml falco_test.yaml
```

View File

@ -1,5 +1,5 @@
# #
# Copyright (C) 2019 The Falco Authors. # Copyright (C) 2020 The Falco Authors.
# #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
@ -21,14 +21,14 @@ rules_file: /etc/falco_rules.yaml
# Whether to output events in json or text # Whether to output events in json or text
json_output: false json_output: false
# Send information logs to stderr and/or syslog Note these are *not* security # Send information logs to stderr and/or syslog
# notification logs! These are just Falco lifecycle (and possibly error) logs. # Note these are *not* security notification logs!
# These are just Falco lifecycle (and possibly error) logs.
log_stderr: false log_stderr: false
log_syslog: false log_syslog: false
# Where security notifications should go. # Where security notifications should go.
# Multiple outputs can be enabled. # Multiple outputs can be enabled.
syslog_output: syslog_output:
enabled: false enabled: false

View File

@ -1203,7 +1203,7 @@ int falco_init(int argc, char **argv)
webserver.start(); webserver.start();
} }
// grpc server // gRPC server
if(config.m_grpc_enabled) if(config.m_grpc_enabled)
{ {
// TODO(fntlnz,leodido): when we want to spawn multiple threads we need to have a queue per thread, or implement // TODO(fntlnz,leodido): when we want to spawn multiple threads we need to have a queue per thread, or implement