fix: test for expiry 3 months on Azure certs (#11362)

This commit is contained in:
Spike Curtis
2024-01-02 09:30:36 +04:00
committed by GitHub
parent d257f8163d
commit f28f340c7b

View File

@ -59,7 +59,7 @@ func TestExpiresSoon(t *testing.T) {
cert, err := x509.ParseCertificate(block.Bytes)
require.NoError(t, err)
expiresSoon := cert.NotAfter.Before(time.Now().AddDate(0, 6, 0))
expiresSoon := cert.NotAfter.Before(time.Now().AddDate(0, 3, 0))
if expiresSoon {
t.Errorf("certificate expires within 6 months %s: %s", cert.NotAfter, cert.Subject.CommonName)
} else {