Skip to content

Commit

Permalink
Revert "chore: fix outdated tests"
Browse files Browse the repository at this point in the history
This reverts commit b3a0e35.
  • Loading branch information
arcln committed May 17, 2023
1 parent f7944e4 commit 0d50cb3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ func TestSinglePEMBehindSymlink(t *testing.T) {
Files: []string{path.Join(filepath.Dir(filename), "../test/badlink.pem")},
}, func(metrics []model.MetricFamily) {
metric := getMetricsForName(metrics, "x509_cert_expired")
assert.Len(t, metric, 1, "missing x509_cert_expired metric(s)")
assert.Len(t, getMetricsForName(metrics, "x509_read_errors"), 0)
assert.Len(t, metric, 0, "missing x509_cert_expired metric(s)")
assert.Len(t, getMetricsForName(metrics, "x509_read_errors"), 1)
})

testRequest(t, &Exporter{
Files: []string{path.Join(filepath.Dir(filename), "../test/badlink-relative.pem")},
}, func(metrics []model.MetricFamily) {
metric := getMetricsForName(metrics, "x509_cert_expired")
assert.Len(t, metric, 1, "missing x509_cert_expired metric(s)")
assert.Len(t, getMetricsForName(metrics, "x509_read_errors"), 0)
assert.Len(t, metric, 0, "missing x509_cert_expired metric(s)")
assert.Len(t, getMetricsForName(metrics, "x509_read_errors"), 1)
})
}

Expand Down

0 comments on commit 0d50cb3

Please sign in to comment.