-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Johannes Würbach <[email protected]>
- Loading branch information
1 parent
57719ba
commit 2b6b78e
Showing
8 changed files
with
58 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ func (s *IntegrationSuite) SetUpSuite(c *C) { | |
dsn := os.Getenv("DATA_SOURCE_NAME") | ||
c.Assert(dsn, Not(Equals), "") | ||
|
||
exporter := NewExporter(strings.Split(dsn, ",")) | ||
exporter := NewExporter(strings.Split(dsn, ","), 10*time.Duration) | ||
c.Assert(exporter, NotNil) | ||
// Assign the exporter to the suite | ||
s.e = exporter | ||
|
@@ -66,7 +66,7 @@ func (s *IntegrationSuite) TestAllNamespacesReturnResults(c *C) { | |
c.Assert(err, IsNil) | ||
|
||
// Do a version update | ||
err = s.e.checkMapVersions(ch, server) | ||
err = s.e.checkMapVersions(context.Background(), ch, server) | ||
c.Assert(err, IsNil) | ||
|
||
err = querySettings(ch, server) | ||
|
@@ -99,12 +99,12 @@ func (s *IntegrationSuite) TestInvalidDsnDoesntCrash(c *C) { | |
}() | ||
|
||
// Send a bad DSN | ||
exporter := NewExporter([]string{"invalid dsn"}) | ||
exporter := NewExporter([]string{"invalid dsn"}, 10*time.Duration) | ||
c.Assert(exporter, NotNil) | ||
exporter.scrape(ch) | ||
|
||
// Send a DSN to a non-listening port. | ||
exporter = NewExporter([]string{"postgresql://nothing:[email protected]:1/nothing"}) | ||
exporter = NewExporter([]string{"postgresql://nothing:[email protected]:1/nothing"}, 10*time.Duration) | ||
c.Assert(exporter, NotNil) | ||
exporter.scrape(ch) | ||
} | ||
|
@@ -122,7 +122,7 @@ func (s *IntegrationSuite) TestUnknownMetricParsingDoesntCrash(c *C) { | |
dsn := os.Getenv("DATA_SOURCE_NAME") | ||
c.Assert(dsn, Not(Equals), "") | ||
|
||
exporter := NewExporter(strings.Split(dsn, ",")) | ||
exporter := NewExporter(strings.Split(dsn, ","), 10*time.Duration) | ||
c.Assert(exporter, NotNil) | ||
|
||
// Convert the default maps into a list of empty maps. | ||
|
@@ -154,7 +154,7 @@ func (s *IntegrationSuite) TestExtendQueriesDoesntCrash(c *C) { | |
c.Assert(dsn, Not(Equals), "") | ||
|
||
exporter := NewExporter( | ||
strings.Split(dsn, ","), | ||
strings.Split(dsn, ","), 10*time.Duration, | ||
WithUserQueriesPath("../user_queries_test.yaml"), | ||
) | ||
c.Assert(exporter, NotNil) | ||
|
@@ -168,6 +168,7 @@ func (s *IntegrationSuite) TestAutoDiscoverDatabases(c *C) { | |
|
||
exporter := NewExporter( | ||
strings.Split(dsn, ","), | ||
10*time.Duration, | ||
) | ||
c.Assert(exporter, NotNil) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters