Skip to content

Commit

Permalink
[Heartbeat] fix minor unreachable code (#32659)
Browse files Browse the repository at this point in the history
Signed-off-by: Abirdcfly <[email protected]>
  • Loading branch information
Abirdcfly authored and chrisberkhout committed Jun 1, 2023
1 parent f66c196 commit c548086
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions filebeat/input/file/glob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ func TestGlob(t *testing.T) {
if err != nil {
t.Fatal(err)
}
os.MkdirAll(filepath.Join(root, "foo/bar/baz/qux/quux"), 0o755)
if err := os.MkdirAll(filepath.Join(root, "foo/bar/baz/qux/quux"), 0o755); err != nil {
t.Fatal(err)
}
for _, test := range globTests {
pattern := filepath.Join(root, test.pattern)
matches, err := Glob(pattern, 4)
if err != nil {
t.Fatal(err)
continue
}
var normalizedMatches []string
for _, m := range matches {
Expand Down Expand Up @@ -92,7 +93,6 @@ func TestGlobPatterns(t *testing.T) {
for i, p := range patterns {
if p != test.expectedPatterns[i] {
t.Fatalf("%q expanded to %q instead of %q", test.pattern, patterns, test.expectedPatterns)
break
}
}
}
Expand Down
1 change: 0 additions & 1 deletion filebeat/input/syslog/rfc3164_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,6 @@ func TestPriority(t *testing.T) {
ParserRFC3164([]byte(log), l)
assert.Equal(t, d, l.Priority())
})
return
}
}

Expand Down

0 comments on commit c548086

Please sign in to comment.