diff options
Diffstat (limited to 'vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go')
-rw-r--r-- | vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go b/vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go index 8e5f002c9..48cab4636 100644 --- a/vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go +++ b/vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go @@ -19,7 +19,6 @@ import ( "sync" "testing" "testing/quick" - "time" dto "github.com/prometheus/client_model/go" ) @@ -181,22 +180,3 @@ func TestGaugeFunc(t *testing.T) { t.Errorf("expected %q, got %q", expected, got) } } - -func TestGaugeSetCurrentTime(t *testing.T) { - g := NewGauge(GaugeOpts{ - Name: "test_name", - Help: "test help", - }) - g.SetToCurrentTime() - unixTime := float64(time.Now().Unix()) - - m := &dto.Metric{} - g.Write(m) - - delta := unixTime - m.GetGauge().GetValue() - // This is just a smoke test to make sure SetToCurrentTime is not - // totally off. Tests with current time involved are hard... - if math.Abs(delta) > 5 { - t.Errorf("Gauge set to current time deviates from current time by more than 5s, delta is %f seconds", delta) - } -} |