mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
Fix tests
This commit is contained in:
parent
a4e39c840b
commit
1d75a8fb50
@ -2263,7 +2263,7 @@ func TestConfigFlagsAndEdgecases(t *testing.T) {
|
|||||||
patch: func(rt *RuntimeConfig) {
|
patch: func(rt *RuntimeConfig) {
|
||||||
rt.DataDir = dataDir
|
rt.DataDir = dataDir
|
||||||
rt.Telemetry.AllowedPrefixes = []string{"foo"}
|
rt.Telemetry.AllowedPrefixes = []string{"foo"}
|
||||||
rt.Telemetry.BlockedPrefixes = []string{"bar"}
|
rt.Telemetry.BlockedPrefixes = []string{"consul.api.http", "bar"}
|
||||||
},
|
},
|
||||||
warns: []string{`Filter rule must begin with either '+' or '-': "nix"`},
|
warns: []string{`Filter rule must begin with either '+' or '-': "nix"`},
|
||||||
},
|
},
|
||||||
@ -6361,7 +6361,7 @@ func TestFullConfig(t *testing.T) {
|
|||||||
DogstatsdTags: []string{"3N81zSUB", "Xtj8AnXZ"},
|
DogstatsdTags: []string{"3N81zSUB", "Xtj8AnXZ"},
|
||||||
FilterDefault: true,
|
FilterDefault: true,
|
||||||
AllowedPrefixes: []string{"oJotS8XJ"},
|
AllowedPrefixes: []string{"oJotS8XJ"},
|
||||||
BlockedPrefixes: []string{"cazlEhGn"},
|
BlockedPrefixes: []string{"consul.api.http", "cazlEhGn"},
|
||||||
MetricsPrefix: "ftO6DySn",
|
MetricsPrefix: "ftO6DySn",
|
||||||
PrometheusRetentionTime: 15 * time.Second,
|
PrometheusRetentionTime: 15 * time.Second,
|
||||||
StatsdAddr: "drce87cy",
|
StatsdAddr: "drce87cy",
|
||||||
|
@ -259,6 +259,8 @@ func (s *HTTPServer) handler(enableDebug bool) http.Handler {
|
|||||||
start := time.Now()
|
start := time.Now()
|
||||||
handler(resp, req)
|
handler(resp, req)
|
||||||
|
|
||||||
|
// This new metric is disabled by default with the prefix_filter option.
|
||||||
|
// It will be enabled by default in a future version.
|
||||||
labels := []metrics.Label{{Name: "method", Value: req.Method}, {Name: "path", Value: path_label}}
|
labels := []metrics.Label{{Name: "method", Value: req.Method}, {Name: "path", Value: path_label}}
|
||||||
metrics.MeasureSinceWithLabels([]string{"api", "http"}, start, labels)
|
metrics.MeasureSinceWithLabels([]string{"api", "http"}, start, labels)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user