forked from TrueCloudLab/certificates
Fix linting issue and order of test SUT
This commit is contained in:
parent
2ab9beb7ed
commit
0f9128c873
2 changed files with 7 additions and 8 deletions
|
@ -349,7 +349,6 @@ type attestationObject struct {
|
|||
func deviceAttest01Validate(ctx context.Context, ch *Challenge, db DB, jwk *jose.JSONWebKey, payload []byte) error {
|
||||
var p payloadType
|
||||
if err := json.Unmarshal(payload, &p); err != nil {
|
||||
|
||||
return WrapErrorISE(err, "error unmarshalling JSON")
|
||||
}
|
||||
if p.Error != "" {
|
||||
|
|
|
@ -677,7 +677,7 @@ func TestChallenge_Validate(t *testing.T) {
|
|||
|
||||
err := NewError(ErrorRejectedIdentifierType, "payload contained error: an error")
|
||||
|
||||
sassert.EqualError(t, err.Err, updch.Error.Err.Error())
|
||||
sassert.EqualError(t, updch.Error.Err, err.Err.Error())
|
||||
sassert.Equal(t, err.Type, updch.Error.Type)
|
||||
sassert.Equal(t, err.Detail, updch.Error.Detail)
|
||||
sassert.Equal(t, err.Status, updch.Error.Status)
|
||||
|
@ -3195,7 +3195,7 @@ func Test_deviceAttest01Validate(t *testing.T) {
|
|||
|
||||
err := NewError(ErrorRejectedIdentifierType, "payload contained error: an error")
|
||||
|
||||
sassert.EqualError(t, err.Err, updch.Error.Err.Error())
|
||||
sassert.EqualError(t, updch.Error.Err, err.Err.Error())
|
||||
sassert.Equal(t, err.Type, updch.Error.Type)
|
||||
sassert.Equal(t, err.Detail, updch.Error.Detail)
|
||||
sassert.Equal(t, err.Status, updch.Error.Status)
|
||||
|
@ -3229,7 +3229,7 @@ func Test_deviceAttest01Validate(t *testing.T) {
|
|||
|
||||
err := NewError(ErrorRejectedIdentifierType, "payload contained error: an error")
|
||||
|
||||
sassert.EqualError(t, err.Err, updch.Error.Err.Error())
|
||||
sassert.EqualError(t, updch.Error.Err, err.Err.Error())
|
||||
sassert.Equal(t, err.Type, updch.Error.Type)
|
||||
sassert.Equal(t, err.Detail, updch.Error.Detail)
|
||||
sassert.Equal(t, err.Status, updch.Error.Status)
|
||||
|
@ -3343,7 +3343,7 @@ func Test_deviceAttest01Validate(t *testing.T) {
|
|||
|
||||
err := NewError(ErrorBadAttestationStatementType, "attestation format %q is not enabled", "step")
|
||||
|
||||
sassert.EqualError(t, err.Err, updch.Error.Err.Error())
|
||||
sassert.EqualError(t, updch.Error.Err, err.Err.Error())
|
||||
sassert.Equal(t, err.Type, updch.Error.Type)
|
||||
sassert.Equal(t, err.Detail, updch.Error.Detail)
|
||||
sassert.Equal(t, err.Status, updch.Error.Status)
|
||||
|
@ -3393,7 +3393,7 @@ func Test_deviceAttest01Validate(t *testing.T) {
|
|||
|
||||
err := NewError(ErrorBadAttestationStatementType, "x5c not present")
|
||||
|
||||
sassert.EqualError(t, err.Err, updch.Error.Err.Error())
|
||||
sassert.EqualError(t, updch.Error.Err, err.Err.Error())
|
||||
sassert.Equal(t, err.Type, updch.Error.Type)
|
||||
sassert.Equal(t, err.Detail, updch.Error.Detail)
|
||||
sassert.Equal(t, err.Status, updch.Error.Status)
|
||||
|
@ -3689,7 +3689,7 @@ func Test_deviceAttest01Validate(t *testing.T) {
|
|||
"challenge identifier \"12345678\" doesn't match the attested hardware identifier \"87654321\"",
|
||||
))
|
||||
|
||||
sassert.EqualError(t, err.Err, updch.Error.Err.Error())
|
||||
sassert.EqualError(t, updch.Error.Err, err.Err.Error())
|
||||
sassert.Equal(t, err.Type, updch.Error.Type)
|
||||
sassert.Equal(t, err.Detail, updch.Error.Detail)
|
||||
sassert.Equal(t, err.Status, updch.Error.Status)
|
||||
|
@ -3776,7 +3776,7 @@ func Test_deviceAttest01Validate(t *testing.T) {
|
|||
|
||||
err := NewError(ErrorBadAttestationStatementType, "unexpected attestation object format")
|
||||
|
||||
sassert.EqualError(t, err.Err, updch.Error.Err.Error())
|
||||
sassert.EqualError(t, updch.Error.Err, err.Err.Error())
|
||||
sassert.Equal(t, err.Type, updch.Error.Type)
|
||||
sassert.Equal(t, err.Detail, updch.Error.Detail)
|
||||
sassert.Equal(t, err.Status, updch.Error.Status)
|
||||
|
|
Loading…
Reference in a new issue