mirror of
https://github.com/outbackdingo/certificates.git
synced 2026-01-27 18:18:30 +00:00
Apply suggestions from code review
Co-authored-by: Herman Slatman <hslatman@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -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)
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -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)
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -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)
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -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)
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -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)
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -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)
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -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)
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user