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") {