Skip to content

Commit

Permalink
store: separate tests that need Store from those needing *store
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Romano committed Aug 31, 2017
1 parent 8091be6 commit cab7572
Show file tree
Hide file tree
Showing 4 changed files with 606 additions and 473 deletions.
6 changes: 5 additions & 1 deletion store/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ const (
)

func init() {
prometheus.MustRegister(readCounter)
if prometheus.Register(readCounter) != nil {
// Tests will try to double register sicne the tests use both
// store and store_test packages; ignore second attempts.
return
}
prometheus.MustRegister(writeCounter)
prometheus.MustRegister(expireCounter)
prometheus.MustRegister(watchRequests)
Expand Down
Loading

0 comments on commit cab7572

Please sign in to comment.