Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Improve error logging in metric_poller_test and update health port configuration structure

configuration in both config_test.go and exampleconfig/config.yml.
  • Loading branch information
bonzofenix committed Oct 11, 2024
1 parent 288606f commit 167ec9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ var _ = Describe("MetricPoller", func() {

It("logs an error", func() {
//TODO this should be a prometheus counter not a log statement check
Eventually(logger.Buffer).Should(Say("retrieveMetric Failed"))
Eventually(logger.Buffer, 2*time.Second).Should(Say("retrieveMetric Failed"))

})

It("does not save any metrics", func() {
Expand Down
6 changes: 4 additions & 2 deletions src/autoscaler/metricsforwarder/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ db:
max_idle_connections: 5
connection_max_lifetime: 60s
health:
port: 9999
server_config:
port: 9999
cred_helper_impl: default
`)
})
Expand Down Expand Up @@ -277,7 +278,8 @@ db:
max_idle_connections: 5
connection_max_lifetime: 60s
health:
port: 8081
server_config:
port: 8081
`)
})

Expand Down
3 changes: 2 additions & 1 deletion src/autoscaler/metricsforwarder/exampleconfig/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ db:
max_idle_connections: 5
connection_max_lifetime: 60s
health:
port: 8081
server_config:
port: 8081
rate_limit:
max_amount: 10
valid_duration: 1s

0 comments on commit 167ec9c

Please sign in to comment.