Skip to content

Commit

Permalink
remove accidentally added files from paths
Browse files Browse the repository at this point in the history
  • Loading branch information
kvch committed Apr 8, 2021
1 parent 371b1ba commit 280f4d2
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions filebeat/input/filestream/input_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,6 @@ func TestFilestreamSymlinksEnabled(t *testing.T) {
symlinkName := "test.log.symlink"
inp := env.mustCreateInput(map[string]interface{}{
"paths": []string{
env.abspath(testlogName),
env.abspath(symlinkName),
},
"prospector.scanner.symlinks": "true",
Expand All @@ -766,7 +765,6 @@ func TestFilestreamSymlinksEnabled(t *testing.T) {
env.waitUntilInputStops()

env.requireOffsetInRegistry(testlogName, len(testlines))
env.requireOffsetInRegistry(symlinkName, len(testlines))
}

// test_symlink_rotated from test_harvester.py
Expand All @@ -778,8 +776,6 @@ func TestFilestreamSymlinkRotated(t *testing.T) {
symlinkName := "test.log"
inp := env.mustCreateInput(map[string]interface{}{
"paths": []string{
env.abspath(firstTestlogName),
env.abspath(secondTestlogName),
env.abspath(symlinkName),
},
"prospector.scanner.check_interval": "1ms",
Expand All @@ -798,11 +794,10 @@ func TestFilestreamSymlinkRotated(t *testing.T) {
ctx, cancelInput := context.WithCancel(context.Background())
env.startInput(ctx, inp)

env.waitUntilEventCount(2)
env.waitUntilEventCount(1)

expectedOffset := len(commonLine) + 2
env.requireOffsetInRegistry(firstTestlogName, expectedOffset)
env.requireOffsetInRegistry(secondTestlogName, expectedOffset)

// rotate symlink
env.mustRemoveFile(symlinkName)
Expand All @@ -814,7 +809,6 @@ func TestFilestreamSymlinkRotated(t *testing.T) {
env.waitUntilEventCount(4)
env.requireOffsetInRegistry(firstTestlogName, expectedOffset)
env.requireOffsetInRegistry(secondTestlogName, expectedOffset+len(moreLines))
env.requireOffsetInRegistry(symlinkName, expectedOffset+len(moreLines))

cancelInput()
env.waitUntilInputStops()
Expand All @@ -830,7 +824,6 @@ func TestFilestreamSymlinkRemoved(t *testing.T) {
symlinkName := "test.log.symlink"
inp := env.mustCreateInput(map[string]interface{}{
"paths": []string{
env.abspath(testlogName),
env.abspath(symlinkName),
},
"prospector.scanner.check_interval": "1ms",
Expand Down Expand Up @@ -873,8 +866,7 @@ func TestFilestreamTruncate(t *testing.T) {
symlinkName := "test.log.symlink"
inp := env.mustCreateInput(map[string]interface{}{
"paths": []string{
env.abspath(testlogName),
env.abspath(symlinkName),
env.abspath("*"),
},
"prospector.scanner.check_interval": "1ms",
"prospector.scanner.symlinks": "true",
Expand Down

0 comments on commit 280f4d2

Please sign in to comment.