Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Herman Slatman <hslatman@users.noreply.github.com>
  • Loading branch information
maraino and hslatman authored Jul 1, 2024
1 parent caea80d commit f8bda96
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions authority/provisioner/sign_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,8 @@ func Test_profileDefaultDuration_Option(t *testing.T) {
NotAfter: time.Now().Add(time.Hour),
},
valid: func(cert *x509.Certificate) {
assert.Equals(t, cert.NotBefore, nb)
assert.Equals(t, cert.NotAfter, na)
assert.Equals(t, nb, cert.NotBefore)
assert.Equals(t, na, cert.NotAfter)
},
}
},
Expand All @@ -622,8 +622,8 @@ func Test_profileDefaultDuration_Option(t *testing.T) {
NotAfter: na,
},
valid: func(cert *x509.Certificate) {
assert.Equals(t, cert.NotBefore, nb)
assert.Equals(t, cert.NotAfter, na)
assert.Equals(t, nb, cert.NotBefore)
assert.Equals(t, na, cert.NotAfter)
},
}
},
Expand All @@ -638,8 +638,8 @@ func Test_profileDefaultDuration_Option(t *testing.T) {
NotBefore: nb,
},
valid: func(cert *x509.Certificate) {
assert.Equals(t, cert.NotBefore, nb)
assert.Equals(t, cert.NotAfter, na)
assert.Equals(t, nb, cert.NotBefore)
assert.Equals(t, na, cert.NotAfter)
},
}
},
Expand Down Expand Up @@ -865,8 +865,8 @@ func Test_profileLimitDuration_Option(t *testing.T) {
NotAfter: n.Add(5 * time.Hour),
},
valid: func(cert *x509.Certificate) {
assert.Equals(t, cert.NotBefore, n)
assert.Equals(t, cert.NotAfter, n.Add(5*time.Hour))
assert.Equals(t, n, cert.NotBefore)
assert.Equals(t, n.Add(5*time.Hour), cert.NotAfter)
},
}
},
Expand All @@ -878,8 +878,8 @@ func Test_profileLimitDuration_Option(t *testing.T) {
NotBefore: n,
},
valid: func(cert *x509.Certificate) {
assert.Equals(t, cert.NotBefore, n)
assert.Equals(t, cert.NotAfter, n.Add(4*time.Hour))
assert.Equals(t, n, cert.NotBefore)
assert.Equals(t, n.Add(4*time.Hour), cert.NotAfter)
},
}
},
Expand All @@ -891,8 +891,8 @@ func Test_profileLimitDuration_Option(t *testing.T) {
NotAfter: n.Add(5 * time.Hour),
},
valid: func(cert *x509.Certificate) {
assert.Equals(t, cert.NotBefore, n)
assert.Equals(t, cert.NotAfter, n.Add(5*time.Hour))
assert.Equals(t, n, cert.NotBefore)
assert.Equals(t, n.Add(5*time.Hour), cert.NotAfter)
},
}
},
Expand All @@ -904,8 +904,8 @@ func Test_profileLimitDuration_Option(t *testing.T) {
NotBefore: n,
},
valid: func(cert *x509.Certificate) {
assert.Equals(t, cert.NotBefore, n)
assert.Equals(t, cert.NotAfter, n.Add(5*time.Hour))
assert.Equals(t, n, cert.NotBefore)
assert.Equals(t, n.Add(5*time.Hour), cert.NotAfter)
},
}
},
Expand All @@ -917,8 +917,8 @@ func Test_profileLimitDuration_Option(t *testing.T) {
NotAfter: n.Add(5 * time.Hour),
},
valid: func(cert *x509.Certificate) {
assert.Equals(t, cert.NotBefore, n.Add(4*time.Hour))
assert.Equals(t, cert.NotAfter, n.Add(5*time.Hour))
assert.Equals(t, n.Add(4*time.Hour), cert.NotBefore)
assert.Equals(t, n.Add(5*time.Hour), cert.NotAfter)
},
}
},
Expand Down

0 comments on commit f8bda96

Please sign in to comment.