Merge from main and make gen
This commit is contained in:
1 parent
884e1f2d18
commit
f41bceda83
4 files changed
+12
-13
No files matched your search
@@ -621,8 +621,8 @@ func (rw *Db) Update(ctx context.Context, i interface{}, fieldMaskPaths []string
|
||||
// Delete an object in the db with options: WithOplog, NewOplogMsg, WithWhere.
|
||||
// WithOplog will write an oplog entry for the delete. NewOplogMsg will return
|
||||
// in-memory oplog message. WithOplog and NewOplogMsg cannot be used together.
|
||||
//WithWhere allows specifying an additional constraint on the operation in
|
||||
//addition to the PKs. Delete returns the number of rows deleted and any errors.
|
||||
// WithWhere allows specifying an additional constraint on the operation in
|
||||
// addition to the PKs. Delete returns the number of rows deleted and any errors.
|
||||
func (rw *Db) Delete(ctx context.Context, i interface{}, opt ...Option) (int, error) {
|
||||
const op = "db.Delete"
|
||||
if rw.underlying == nil {
|
||||
|
||||
@@ -359,7 +359,7 @@ func (r *Repository) UpdateSet(ctx context.Context, scopeId string, s *HostSet,
|
||||
db.ExpBackoff{},
|
||||
func(reader db.Reader, w db.Writer) error {
|
||||
returnedSet = newSet.clone()
|
||||
msgs := make([]*oplog.Message, 0, len(preferredEndpoints) + len(currentSet.PreferredEndpoints) + 2)
|
||||
msgs := make([]*oplog.Message, 0, len(preferredEndpoints)+len(currentSet.PreferredEndpoints)+2)
|
||||
ticket, err := w.GetTicket(s)
|
||||
if err != nil {
|
||||
return errors.Wrap(ctx, err, op, errors.WithMsg("unable to get ticket"))
|
||||
|
||||
@@ -655,16 +655,16 @@ func TestRepository_UpdateSet(t *testing.T) {
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
withScopeId *string
|
||||
withEmptyPluginMap bool
|
||||
withPluginError error
|
||||
changeFuncs []changeHostSetFunc
|
||||
version uint32
|
||||
fieldMask []string
|
||||
wantCheckSetFuncs []checkHostSetFunc
|
||||
name string
|
||||
withScopeId *string
|
||||
withEmptyPluginMap bool
|
||||
withPluginError error
|
||||
changeFuncs []changeHostSetFunc
|
||||
version uint32
|
||||
fieldMask []string
|
||||
wantCheckSetFuncs []checkHostSetFunc
|
||||
wantCheckPluginReqFuncs []checkPluginReqFunc
|
||||
wantIsErr errors.Code
|
||||
wantIsErr errors.Code
|
||||
}{
|
||||
{
|
||||
name: "nil set",
|
||||
|
||||
@@ -274,7 +274,6 @@ func workerRequestInfoInterceptor(ctx context.Context, eventer *event.Eventer) (
|
||||
const op = "worker.requestInfoInterceptor"
|
||||
if eventer == nil {
|
||||
return nil, errors.New(ctx, errors.InvalidParameter, op, "missing eventer")
|
||||
|
||||
}
|
||||
return func(interceptorCtx context.Context,
|
||||
req interface{},
|
||||
|
||||
Reference in new issue
Block a user