github.com/webdestroya/awsmocker@v0.2.6/certs_test.go (about) 1 package awsmocker_test 2 3 import ( 4 "testing" 5 "time" 6 7 "github.com/webdestroya/awsmocker" 8 ) 9 10 func TestCheckCertificateExpiry(t *testing.T) { 11 cert := awsmocker.CACert() 12 13 if cert.NotAfter.Before(time.Now().AddDate(3, 0, 0)) { 14 t.Fatal("CA Certificate expires within 3 years. Should be regenerated") 15 } 16 }