change errnotfound type for getAccount

- more generalized NotFound type rather than the nosql
one we were using
- if the error is not recognized then the logic in create account will
break.
This commit is contained in:
max furman 2021-03-25 14:54:12 -07:00
parent 1831920363
commit 80c8567d99
5 changed files with 24 additions and 55 deletions

View file

@ -1047,7 +1047,7 @@ func TestHandler_extractJWK(t *testing.T) {
db: &acme.MockDB{
MockGetAccountByKeyID: func(ctx context.Context, kid string) (*acme.Account, error) {
assert.Equals(t, kid, pub.KeyID)
return nil, database.ErrNotFound
return nil, acme.ErrNotFound
},
},
next: func(w http.ResponseWriter, r *http.Request) {