Skip to content

Commit

Permalink
fix: notBefore and notAfter changed in CA test (#5669) (#5671)
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Lavacca <[email protected]>
(cherry picked from commit 04f448c)

Co-authored-by: Mattia Lavacca <[email protected]>
  • Loading branch information
team-k8s-bot and mlavacca authored Feb 29, 2024
1 parent fc60603 commit 12cfb44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/helpers/certificate/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ func MustGenerateSelfSignedCert(decorators ...SelfSignedCertificateOptionsDecora
notBefore := time.Now()
notAfter := notBefore.AddDate(1, 0, 0)
if options.Expired {
notBefore = notBefore.AddDate(-1, 0, 0)
notAfter = notAfter.AddDate(-1, 0, 0)
notBefore = notBefore.AddDate(-2, 0, 0)
notAfter = notAfter.AddDate(-2, 0, 0)
}

// Create a self-signed X.509 certificate.
Expand Down

0 comments on commit 12cfb44

Please sign in to comment.