Reverted tests

This commit is contained in:
Michael Travis 2016-12-02 14:58:42 +00:00
parent fe527ca6d9
commit dcd32f1aef
1 changed files with 20 additions and 29 deletions

View File

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