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) }