From d926a3b5daddb097b390dd080cd5d47bddedb1c9 Mon Sep 17 00:00:00 2001 From: Kevin Bouwkamp Date: Sun, 13 Sep 2015 20:22:19 -0400 Subject: [PATCH] no longer duplicate ignored columns here --- plugins/postgresql/postgresql_test.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/plugins/postgresql/postgresql_test.go b/plugins/postgresql/postgresql_test.go index 4c44addce..e9ff99e4e 100644 --- a/plugins/postgresql/postgresql_test.go +++ b/plugins/postgresql/postgresql_test.go @@ -156,14 +156,7 @@ func TestPostgresqlIgnoresUnwantedColumns(t *testing.T) { err := p.Gather(&acc) require.NoError(t, err) - var found bool - - for _, pnt := range acc.Points { - if pnt.Measurement == "datname" || pnt.Measurement == "datid" || pnt.Measurement == "stats_reset" { - found = true - break - } + for col := range p.IgnoredColumns() { + assert.False(t, acc.HasMeasurement(col)) } - - assert.False(t, found) }