Skip to content

Commit

Permalink
[pkg/stanza] Fix tests on Windows (#32305)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax authored Apr 10, 2024
1 parent 2b0d1be commit a86e505
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions pkg/stanza/fileconsumer/matcher/matcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -715,35 +715,35 @@ func TestMatcher(t *testing.T) {
{
name: "Recursive match - include",
files: []string{
"a/1.log",
"a/2.log",
"a/b/1.log",
"a/b/2.log",
"a/b/c/1.log",
"a/b/c/2.log",
},
include: []string{"**/1.log"},
filepath.Join("a", "1.log"),
filepath.Join("a", "2.log"),
filepath.Join("a", "b", "1.log"),
filepath.Join("a", "b", "2.log"),
filepath.Join("a", "b", "c", "1.log"),
filepath.Join("a", "b", "c", "2.log"),
},
include: []string{filepath.Join("**", "1.log")},
exclude: []string{},
expected: []string{
"a/1.log",
"a/b/1.log",
"a/b/c/1.log",
filepath.Join("a", "1.log"),
filepath.Join("a", "b", "1.log"),
filepath.Join("a", "b", "c", "1.log"),
},
},
{
name: "Recursive match - include and exclude",
files: []string{
"a/1.log",
"a/2.log",
"a/b/1.log",
"a/b/2.log",
"a/b/c/1.log",
"a/b/c/2.log",
},
include: []string{"**/1.log"},
exclude: []string{"**/b/**/1.log"},
filepath.Join("a", "1.log"),
filepath.Join("a", "2.log"),
filepath.Join("a", "b", "1.log"),
filepath.Join("a", "b", "2.log"),
filepath.Join("a", "b", "c", "1.log"),
filepath.Join("a", "b", "c", "2.log"),
},
include: []string{filepath.Join("**", "1.log")},
exclude: []string{filepath.Join("**", "b", "**", "1.log")},
expected: []string{
"a/1.log",
filepath.Join("a", "1.log"),
},
}}

Expand Down

0 comments on commit a86e505

Please sign in to comment.