1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-06-16 04:40:57 +03:00

Add a test case to detect regression on issue fixed by PR #39.

Related issue is #38. Time to start expanding functional test coverage since
the integration tests missed this.
This commit is contained in:
Will Rouesnel
2016-11-29 02:12:51 +11:00
parent 8f3088611b
commit 3ead0f9aff
3 changed files with 91 additions and 1 deletions

View File

@ -508,6 +508,9 @@ func makeDescMap(pgVersion semver.Version, metricMaps map[string]map[string]Colu
// Force to discard if not compatible.
if columnMapping.supportedVersions != nil {
if !columnMapping.supportedVersions(pgVersion) {
// It's very useful to be able to see what columns are being
// rejected.
log.Debugln(columnName, "is being forced to discard due to version incompatibility.")
thisMap[columnName] = MetricMap{
discard: true,
conversion: func(in interface{}) (float64, bool) {