From ebde18d01b0d35d540f7230ef5825d0901f031b5 Mon Sep 17 00:00:00 2001 From: Didier Roche Date: Thu, 16 Nov 2023 07:52:07 +0100 Subject: [PATCH] Adapt the completion tests for the new skip Exclude from the accounting asserts the skip parts. --- cmd/adsysd/integration_tests/adsysctl_doc_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/adsysd/integration_tests/adsysctl_doc_test.go b/cmd/adsysd/integration_tests/adsysctl_doc_test.go index 220d103e3..a4ee26d9a 100644 --- a/cmd/adsysd/integration_tests/adsysctl_doc_test.go +++ b/cmd/adsysd/integration_tests/adsysctl_doc_test.go @@ -118,8 +118,11 @@ func TestDocCompletion(t *testing.T) { var wantNumDocs int docsDir := filepath.Join(rootProjectDir, "docs") err = filepath.WalkDir(docsDir, func(path string, d fs.DirEntry, err error) error { - // Ignore directories, every reference doc under reuse and compiled content. - if d.IsDir() || strings.HasPrefix(path, filepath.Join(docsDir, "reuse")) || strings.HasPrefix(path, docsDir+"/.") { + // Ignore directories, every reference doc under reuse, compiled content and any autogenerated policy documentation. + if d.IsDir() || + strings.HasPrefix(path, filepath.Join(docsDir, "reuse")) || + strings.HasPrefix(path, docsDir+"/.") || + strings.HasPrefix(path, filepath.Join(docsDir, "reference", "policies")) { return nil } if !strings.HasSuffix(d.Name(), ".md") {