From d8da77cb42ed956317340433ef6a3dd0cc342873 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Mon, 11 Dec 2017 15:33:44 -0800 Subject: [PATCH] Add idle state to processes test (cherry picked from commit 14b31a23545270d7f9464872bba4c4f07083f586) --- plugins/inputs/system/processes_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/inputs/system/processes_test.go b/plugins/inputs/system/processes_test.go index 8a9b0fb6b..5401e1a70 100644 --- a/plugins/inputs/system/processes_test.go +++ b/plugins/inputs/system/processes_test.go @@ -44,7 +44,8 @@ func TestFromPS(t *testing.T) { fields["zombies"] = int64(1) fields["running"] = int64(4) fields["sleeping"] = int64(34) - fields["total"] = int64(43) + fields["idle"] = int64(2) + fields["total"] = int64(45) acc.AssertContainsTaggedFields(t, "processes", fields, map[string]string{}) } @@ -172,6 +173,8 @@ U Z D S+ +I +I ` const testProcStat = `10 (rcuob/0) %s 2 0 0 0 -1 2129984 0 0 0 0 0 0 0 0 20 0 %s 0 11 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 18446744073709551615 0 0 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0