ICU-738/Refactor internal/db to domain errors (#815)

* Refactor internal/db to domain errors
This commit is contained in:
Louis Ruch authored and GitHub committed 2020-12-21 10:07:34 -08:00
1 parent b5d84495a3
commit bfbb179741
82 files changed
+742 -640

No files matched your search

+2 -2
View File
@@ -1532,7 +1532,7 @@ func TestRepository_DeleteSession(t *testing.T) {
},
wantRowsDeleted: 0,
wantErr: true,
wantErrMsg: "delete session: failed record not found:",
wantErrMsg: "delete session: failed db.LookupById: record not found",
},
}
for _, tt := range tests {
@@ -1545,7 +1545,7 @@ func TestRepository_DeleteSession(t *testing.T) {
assert.Contains(err.Error(), tt.wantErrMsg)
err = db.TestVerifyOplog(t, rw, tt.args.session.PublicId, db.WithOperation(oplog.OpType_OP_TYPE_DELETE), db.WithCreateNotBefore(10*time.Second))
assert.Error(err)
assert.True(errors.Is(errors.ErrRecordNotFound, err))
assert.True(errors.IsNotFoundError(err))
return
}
assert.NoError(err)