Skip to content

Commit

Permalink
Revert "chore: fix outdated tests"
Browse files Browse the repository at this point in the history
This reverts commit 9d87516.
  • Loading branch information
arcln committed May 17, 2023
1 parent 0d50cb3 commit ccf683c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions internal/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,13 +733,13 @@ func TestFileGlobbing(t *testing.T) {
Files: []string{"../test/**/*.pem"},
}, func(metrics []model.MetricFamily) {
foundMetrics := getMetricsForName(metrics, "x509_cert_expired")
assert.Len(t, foundMetrics, 8)
assert.Len(t, foundMetrics, 6)
foundNbMetrics := getMetricsForName(metrics, "x509_cert_not_before")
assert.Len(t, foundNbMetrics, 8)
assert.Len(t, foundNbMetrics, 6)
foundNaMetrics := getMetricsForName(metrics, "x509_cert_not_after")
assert.Len(t, foundNaMetrics, 8)
assert.Len(t, foundNaMetrics, 6)
errMetric := getMetricsForName(metrics, "x509_read_errors")
assert.Equal(t, 2., errMetric[0].GetGauge().GetValue())
assert.Equal(t, 4., errMetric[0].GetGauge().GetValue())
})

// invalid pattern
Expand Down Expand Up @@ -810,13 +810,13 @@ func TestDirectoryGlobbing(t *testing.T) {
Directories: []string{"../tes*"},
}, func(metrics []model.MetricFamily) {
foundMetrics := getMetricsForName(metrics, "x509_cert_expired")
assert.Len(t, foundMetrics, 6)
assert.Len(t, foundMetrics, 4)
foundNbMetrics := getMetricsForName(metrics, "x509_cert_not_before")
assert.Len(t, foundNbMetrics, 6)
assert.Len(t, foundNbMetrics, 4)
foundNaMetrics := getMetricsForName(metrics, "x509_cert_not_after")
assert.Len(t, foundNaMetrics, 6)
assert.Len(t, foundNaMetrics, 4)
errMetric := getMetricsForName(metrics, "x509_read_errors")
assert.Equal(t, 17., errMetric[0].GetGauge().GetValue())
assert.Equal(t, 19., errMetric[0].GetGauge().GetValue())
})

// double star match
Expand Down

0 comments on commit ccf683c

Please sign in to comment.