diff --git a/plugins/inputs/filestat/filestat_test.go b/plugins/inputs/filestat/filestat_test.go index 1a9aa73dd..a404869d9 100644 --- a/plugins/inputs/filestat/filestat_test.go +++ b/plugins/inputs/filestat/filestat_test.go @@ -25,9 +25,8 @@ func TestGatherNoMd5(t *testing.T) { "file": dir + "log1.log", } fields1 := map[string]interface{}{ - "size_bytes": int64(0), - "exists": int64(1), - "modification_time": int64(1) + "size_bytes": int64(0), + "exists": int64(1), } acc.AssertContainsTaggedFields(t, "filestat", fields1, tags1) @@ -35,9 +34,8 @@ func TestGatherNoMd5(t *testing.T) { "file": dir + "log2.log", } fields2 := map[string]interface{}{ - "size_bytes": int64(0), - "exists": int64(1), - "modification_time": int64(1) + "size_bytes": int64(0), + "exists": int64(1), } acc.AssertContainsTaggedFields(t, "filestat", fields2, tags2) @@ -67,10 +65,9 @@ func TestGatherExplicitFiles(t *testing.T) { "file": dir + "log1.log", } fields1 := map[string]interface{}{ - "size_bytes": int64(0), - "exists": int64(1), - "modification_time": int64(1) - "md5_sum": "d41d8cd98f00b204e9800998ecf8427e", + "size_bytes": int64(0), + "exists": int64(1), + "md5_sum": "d41d8cd98f00b204e9800998ecf8427e", } acc.AssertContainsTaggedFields(t, "filestat", fields1, tags1) @@ -78,9 +75,8 @@ func TestGatherExplicitFiles(t *testing.T) { "file": dir + "log2.log", } fields2 := map[string]interface{}{ - "size_bytes": int64(0), - "exists": int64(1), - "modification_time": int64(1) + "size_bytes": int64(0), + "exists": int64(1), "md5_sum": "d41d8cd98f00b204e9800998ecf8427e", } acc.AssertContainsTaggedFields(t, "filestat", fields2, tags2) @@ -109,9 +105,8 @@ func TestGatherGlob(t *testing.T) { "file": dir + "log1.log", } fields1 := map[string]interface{}{ - "size_bytes": int64(0), - "exists": int64(1), - "modification_time": int64(1) + "size_bytes": int64(0), + "exists": int64(1), "md5_sum": "d41d8cd98f00b204e9800998ecf8427e", } acc.AssertContainsTaggedFields(t, "filestat", fields1, tags1) @@ -120,9 +115,8 @@ func TestGatherGlob(t *testing.T) { "file": dir + "log2.log", } fields2 := map[string]interface{}{ - "size_bytes": int64(0), - "exists": int64(1), - "modification_time": int64(1) + "size_bytes": int64(0), + "exists": int64(1), "md5_sum": "d41d8cd98f00b204e9800998ecf8427e", } acc.AssertContainsTaggedFields(t, "filestat", fields2, tags2) @@ -143,9 +137,8 @@ func TestGatherSuperAsterisk(t *testing.T) { "file": dir + "log1.log", } fields1 := map[string]interface{}{ - "size_bytes": int64(0), - "exists": int64(1), - "modification_time": int64(1) + "size_bytes": int64(0), + "exists": int64(1), "md5_sum": "d41d8cd98f00b204e9800998ecf8427e", } acc.AssertContainsTaggedFields(t, "filestat", fields1, tags1) @@ -154,9 +147,8 @@ func TestGatherSuperAsterisk(t *testing.T) { "file": dir + "log2.log", } fields2 := map[string]interface{}{ - "size_bytes": int64(0), - "exists": int64(1), - "modification_time": int64(1) + "size_bytes": int64(0), + "exists": int64(1), "md5_sum": "d41d8cd98f00b204e9800998ecf8427e", } acc.AssertContainsTaggedFields(t, "filestat", fields2, tags2) @@ -165,10 +157,9 @@ func TestGatherSuperAsterisk(t *testing.T) { "file": dir + "test.conf", } fields3 := map[string]interface{}{ - "size_bytes": int64(104), - "exists": int64(1), - "modification_time": int64(1) - "md5_sum": "5a7e9b77fa25e7bb411dbd17cf403c1f", + "size_bytes": int64(104), + "exists": int64(1), + "md5_sum": "5a7e9b77fa25e7bb411dbd17cf403c1f", } acc.AssertContainsTaggedFields(t, "filestat", fields3, tags3) }