From 85ec911e432d6f27f6fc9361a654fa0051f17978 Mon Sep 17 00:00:00 2001 From: Eleftheria Stein-Kousathana Date: Thu, 2 Jan 2025 10:55:53 +0100 Subject: [PATCH] Skip testdata yaml files (#5240) Skip yaml file in rules testsdata --- pkg/profiles/rule_validator_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/profiles/rule_validator_test.go b/pkg/profiles/rule_validator_test.go index f08cec5024..7112c2efcf 100644 --- a/pkg/profiles/rule_validator_test.go +++ b/pkg/profiles/rule_validator_test.go @@ -106,7 +106,7 @@ func TestExampleRulesAreValidatedCorrectly(t *testing.T) { } // skip test files - if strings.HasSuffix(path, ".test.yaml") || strings.HasSuffix(path, ".test.yml") { + if strings.HasSuffix(path, ".test.yaml") || strings.HasSuffix(path, ".test.yml") || strings.Contains(filepath.Dir(path), ".testdata") { return nil }