From 8786bc6d4d19b45986e97b8e1de532aa15d0e547 Mon Sep 17 00:00:00 2001 From: marco Date: Tue, 10 Sep 2024 09:55:11 +0200 Subject: [PATCH] appsec_stub.go --- .github/workflows/go-tests.yml | 9 +++++---- cmd/crowdsec/appsec_stub.go | 11 +++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 cmd/crowdsec/appsec_stub.go diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 4efffc679b1..df5c0b4fb88 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -142,16 +142,17 @@ jobs: make build BUILD_STATIC=1 make go-acc | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter + # check if some component stubs are missing + - name: "Build profile: minimal" + run: | + make build BUILD_PROFILE=minimal + - name: Run tests again, dynamic run: | make clean build set -o pipefail make go-acc | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter - - name: "Build profile: minimal" - run: | - make build BUILD_PROFILE=minimal - - name: Upload unit coverage to Codecov uses: codecov/codecov-action@v4 with: diff --git a/cmd/crowdsec/appsec_stub.go b/cmd/crowdsec/appsec_stub.go new file mode 100644 index 00000000000..5abf317f17c --- /dev/null +++ b/cmd/crowdsec/appsec_stub.go @@ -0,0 +1,11 @@ +// +build no_datasource_appsec + +package main + +import ( + "github.com/crowdsecurity/crowdsec/pkg/cwhub" +) + +func LoadAppsecRules(hub *cwhub.Hub) error { + return nil +}