mirror of
https://github.com/falcosecurity/falco.git
synced 2025-10-21 11:29:26 +00:00
Add ability to run branch-specific trace files.
Pass the travis branch to run_regression_tests.sh. When downloading trace files, first look for a file traces-XXX-$BRANCH and if found download it. This allows testing out a set of changes with a trace file specifically for that branch, that can be moved to the normal file once the PR is merged. Also increase the timeout for the spawned falco process from 1 to 3 minutes. In debug mode, the kubernetes demo was taking slightly over 1 minute.
This commit is contained in:
@@ -42,7 +42,7 @@ class FalcoTest(Test):
|
||||
|
||||
self.falco_proc = process.SubProcess(cmd)
|
||||
|
||||
res = self.falco_proc.run(timeout=60, sig=9)
|
||||
res = self.falco_proc.run(timeout=180, sig=9)
|
||||
|
||||
if res.exit_status != 0:
|
||||
self.error("Falco command \"{}\" exited with non-zero return value {}".format(
|
||||
|
@@ -3,11 +3,13 @@
|
||||
SCRIPT=$(readlink -f $0)
|
||||
SCRIPTDIR=$(dirname $SCRIPT)
|
||||
MULT_FILE=$SCRIPTDIR/falco_tests.yaml
|
||||
BRANCH=$1
|
||||
|
||||
function download_trace_files() {
|
||||
echo "branch=$BRANCH"
|
||||
for TRACE in traces-positive traces-negative traces-info ; do
|
||||
rm -rf $SCRIPTDIR/$TRACE
|
||||
curl -so $SCRIPTDIR/$TRACE.zip https://s3.amazonaws.com/download.draios.com/falco-tests/$TRACE.zip &&
|
||||
curl -fso $SCRIPTDIR/$TRACE.zip https://s3.amazonaws.com/download.draios.com/falco-tests/$TRACE-$BRANCH.zip || curl -fso $SCRIPTDIR/$TRACE.zip https://s3.amazonaws.com/download.draios.com/falco-tests/$TRACE.zip &&
|
||||
unzip -d $SCRIPTDIR $SCRIPTDIR/$TRACE.zip &&
|
||||
rm -rf $SCRIPTDIR/$TRACE.zip
|
||||
done
|
||||
|
Reference in New Issue
Block a user