Another case of untyped integer overflows on 32-bit arch.
Fixes failed test build:
$ GOARCH=386 go test ./...
# github.com/prometheus-community/postgres_exporter/collector [github.com/prometheus-community/postgres_exporter/collector.test]
collector/pg_stat_walreceiver_test.go:67:4: cannot use 1200668684563608 (untyped int constant) as int value in argument to sqlmock.NewRows(columns).AddRow (overflows)
collector/pg_stat_walreceiver_test.go:69:4: cannot use 1200668684563609 (untyped int constant) as int value in argument to sqlmock.NewRows(columns).AddRow (overflows)
collector/pg_stat_walreceiver_test.go:73:4: cannot use 1200668684563610 (untyped int constant) as int value in argument to sqlmock.NewRows(columns).AddRow (overflows)
collector/pg_stat_walreceiver_test.go:146:4: cannot use 1200668684563608 (untyped int constant) as int value in argument to sqlmock.NewRows(columns).AddRow (overflows)
collector/pg_stat_walreceiver_test.go:151:4: cannot use 1200668684563610 (untyped int constant) as int value in argument to sqlmock.NewRows(columns).AddRow (overflows)
ok github.com/prometheus-community/postgres_exporter/cmd/postgres_exporter 0.007s
FAIL github.com/prometheus-community/postgres_exporter/collector [build failed]
ok github.com/prometheus-community/postgres_exporter/config 0.005s
FAIL
Please consider adding 32-bit builds / tests to CI, so that these are caught automatically in future.
Another case of untyped integer overflows on 32-bit arch.
Fixes failed test build:
Please consider adding 32-bit builds / tests to CI, so that these are caught automatically in future.
Refs: #844