Skip to content

PMM-7961 Updated expoter_shared version #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions cmd/postgres_exporter/postgres_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ import (
// Hook up gocheck into the "go test" runner.
func Test(t *testing.T) { TestingT(t) }

type FunctionalSuite struct {
}
type FunctionalSuite struct{}

var _ = Suite(&FunctionalSuite{})

func (s *FunctionalSuite) SetUpSuite(c *C) {

}

func (s *FunctionalSuite) TestSemanticVersionColumnDiscard(c *C) {
Expand Down Expand Up @@ -111,7 +109,7 @@ func (s *FunctionalSuite) TestEnvironmentSettingWithSecretsFiles(c *C) {
c.Assert(err, IsNil)
defer UnsetEnvironment(c, "DATA_SOURCE_URI")

var expected = "postgresql://custom_username$&+,%2F%3A;=%3F%40:custom_password$&+,%2F%3A;=%3F%40@localhost:5432/?sslmode=disable"
expected := "postgresql://custom_username$&+,%2F%3A;=%3F%40:custom_password$&+,%2F%3A;=%3F%40@localhost:5432/?sslmode=disable"

dsn := getDataSources()
if len(dsn) == 0 {
Expand Down Expand Up @@ -165,7 +163,7 @@ func (s *FunctionalSuite) TestEnvironmentSettingWithDnsAndSecrets(c *C) {
// test DSN including SSL enabled
func (s *FunctionalSuite) TestSSL(c *C) {
// Thr driver doesn't support sslmode=prefer
envDsn := "postgresql://root:root@localhost:5433/?sslmode=require"
envDsn := "host=127.0.0.1 port=5433 user=root password=root database=postgres sslmode=require"
err := os.Setenv("DATA_SOURCE_NAME", envDsn)
c.Assert(err, IsNil)
defer UnsetEnvironment(c, "DATA_SOURCE_NAME")
Expand Down Expand Up @@ -196,7 +194,6 @@ func (s *FunctionalSuite) TestSSL(c *C) {

db, err := sql.Open("postgres", dsn[0])
c.Assert(err, IsNil)
//v95 := semver.MustParse("9.5.0")
version, err := postgresVersion(db)
c.Assert(err, IsNil)
if version < 90500 {
Expand Down Expand Up @@ -328,7 +325,6 @@ func UnsetEnvironment(c *C, d string) {

// test boolean metric type gets converted to float
func (s *FunctionalSuite) TestBooleanConversionToValueAndString(c *C) {

type TestCase struct {
input interface{}
expectedString string
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/lib/pq v1.9.0
github.com/percona/exporter_shared v0.7.2
github.com/percona/exporter_shared v0.7.3
github.com/percona/postgres_exporter v0.4.6 // indirect
github.com/prometheus/client_golang v1.10.0
github.com/prometheus/client_model v0.2.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/percona/exporter_shared v0.7.2 h1:8eNBht83bgFagdiIm3b4HbsOFc5du6OUBCUVenTumdw=
github.com/percona/exporter_shared v0.7.2/go.mod h1:AWk9lgTPzI7tC5PzpeBGvhhqjSJNxpPNFaF7qLIJqmo=
github.com/percona/exporter_shared v0.7.3 h1:TX4LisZ08jo8KIlekBTwPX13JlM6gOOKgmwg7QEf+r8=
github.com/percona/exporter_shared v0.7.3/go.mod h1:AWk9lgTPzI7tC5PzpeBGvhhqjSJNxpPNFaF7qLIJqmo=
github.com/percona/postgres_exporter v0.4.6 h1:/x0qAgP7fzmle/MS3sPKt+3FW94amnUqTJtlibgGNSk=
github.com/percona/postgres_exporter v0.4.6/go.mod h1:n1QU5O3iehITC/jEOGg1G0U/yKalDDmQVrELcjDMafw=
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
Expand Down