Skip to content

Commit

Permalink
Adapt the completion tests for the new skip
Browse files Browse the repository at this point in the history
Exclude from the accounting asserts the skip parts.
  • Loading branch information
didrocks committed Nov 16, 2023
1 parent 614e190 commit ebde18d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/adsysd/integration_tests/adsysctl_doc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit ebde18d

Please sign in to comment.