|
@@ -146,11 +146,9 @@ func Test_reflectRequestID(t *testing.T) {
|
|
|
var firstErr *errs.Error
|
|
var firstErr *errs.Error
|
|
|
if assert.ErrorAs(t, err, &firstErr) {
|
|
if assert.ErrorAs(t, err, &firstErr) {
|
|
|
assert.Equal(t, 404, firstErr.StatusCode())
|
|
assert.Equal(t, 404, firstErr.StatusCode())
|
|
|
- assert.Equal(t, "root with fingerprint invalid was not found", firstErr.Err.Error())
|
|
|
|
|
|
|
+ assert.Equal(t, `root certificate with fingerprint "invalid" was not found`, firstErr.Err.Error())
|
|
|
assert.NotEmpty(t, firstErr.RequestID)
|
|
assert.NotEmpty(t, firstErr.RequestID)
|
|
|
|
|
|
|
|
- // TODO: include the below error in the JSON? It's currently only output to the CA logs. Also see https://github.com/smallstep/certificates/pull/759
|
|
|
|
|
- // assert.Equal(t, "/root/invalid was not found: certificate with fingerprint invalid was not found", apiErr.Msg)
|
|
|
|
|
}
|
|
}
|
|
|
assert.Nil(t, rootResponse)
|
|
assert.Nil(t, rootResponse)
|
|
|
|
|
|
|
@@ -159,7 +157,7 @@ func Test_reflectRequestID(t *testing.T) {
|
|
|
var secondErr *errs.Error
|
|
var secondErr *errs.Error
|
|
|
if assert.ErrorAs(t, err, &secondErr) {
|
|
if assert.ErrorAs(t, err, &secondErr) {
|
|
|
assert.Equal(t, 404, secondErr.StatusCode())
|
|
assert.Equal(t, 404, secondErr.StatusCode())
|
|
|
- assert.Equal(t, "root with fingerprint invalid was not found", secondErr.Err.Error())
|
|
|
|
|
|
|
+ assert.Equal(t, `root certificate with fingerprint "invalid" was not found`, secondErr.Err.Error())
|
|
|
assert.Equal(t, "reqID", secondErr.RequestID)
|
|
assert.Equal(t, "reqID", secondErr.RequestID)
|
|
|
}
|
|
}
|
|
|
assert.Nil(t, rootResponse)
|
|
assert.Nil(t, rootResponse)
|