mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
fix: test for expiry 3 months on Azure certs (#11362)
This commit is contained in:
@ -59,7 +59,7 @@ func TestExpiresSoon(t *testing.T) {
|
|||||||
cert, err := x509.ParseCertificate(block.Bytes)
|
cert, err := x509.ParseCertificate(block.Bytes)
|
||||||
require.NoError(t, err)
|
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 {
|
if expiresSoon {
|
||||||
t.Errorf("certificate expires within 6 months %s: %s", cert.NotAfter, cert.Subject.CommonName)
|
t.Errorf("certificate expires within 6 months %s: %s", cert.NotAfter, cert.Subject.CommonName)
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user