Skip to content

Commit 2517a8f

Browse files
cert-checker: Exit non-zero on check failure (#8759)
Fixes #8748
1 parent 7c321ac commit 2517a8f

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

cmd/cert-checker/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,10 @@ func main() {
680680
)
681681
err = checker.issuedReport.dump()
682682
cmd.FailOnError(err, "Failed to dump results: %s\n")
683+
684+
if checker.issuedReport.BadCerts > 0 {
685+
os.Exit(1)
686+
}
683687
}
684688

685689
func init() {

test/config-next/cert-checker.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"checkPeriod": "72h",
1212
"acceptableValidityDurations": [
1313
"7776000s",
14+
"583200s",
1415
"160h"
1516
],
1617
"lintConfig": "test/config-next/zlint.toml",

test/config/cert-checker.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"checkPeriod": "72h",
1212
"acceptableValidityDurations": [
1313
"7776000s",
14+
"583200s",
1415
"160h"
1516
],
1617
"ignoredLints": [

0 commit comments

Comments
 (0)