From 85abccb4a45b17f7272c97fb6789a215fca1f434 Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Wed, 27 Aug 2025 13:05:59 +0600 Subject: [PATCH] dev: delete fanal.db before tests Signed-off-by: Nikita Pivkin --- Makefile | 11 +++++++---- test/data/secret-scan/report.json | 8 ++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index bd701f4..2cf081d 100644 --- a/Makefile +++ b/Makefile @@ -16,15 +16,18 @@ BATS_ENV := BATS_LIB_PATH=$(BATS_LIB_PATH) \ BATS_FLAGS := --recursive --timing --verbose-run . .PHONY: test -test: - mkdir -p .cache +test: init-cache $(BATS_ENV) bats $(BATS_FLAGS) .PHONY: update-golden -update-golden: - mkdir -p .cache +update-golden: init-cache UPDATE_GOLDEN=1 $(BATS_ENV) bats $(BATS_FLAGS) +.PHONY: init-cache +init-cache: + mkdir -p .cache + rm -f .cache/fanal/fanal.db + bump-trivy: @[ $$NEW_VERSION ] || ( echo "env 'NEW_VERSION' is not set"; exit 1 ) @CURRENT_VERSION=$$(grep "TRIVY_VERSION:" .github/workflows/test.yaml | awk '{print $$2}');\ diff --git a/test/data/secret-scan/report.json b/test/data/secret-scan/report.json index ec3d59b..b22503e 100644 --- a/test/data/secret-scan/report.json +++ b/test/data/secret-scan/report.json @@ -2,6 +2,14 @@ "SchemaVersion": 2, "ArtifactName": "https://github.com/krol3/demo-trivy/", "ArtifactType": "repository", + "Metadata": { + "RepoURL": "https://github.com/krol3/demo-trivy/", + "Branch": "main", + "Commit": "547db823c73fdb3385871f6235e946c72291f734", + "CommitMsg": "chore: add gitignore", + "Author": "carolina valencia ", + "Committer": "carolina valencia " + }, "Results": [ { "Target": "env",