Skip to content

Commit df3c0ab

Browse files
committed
Replace store.WithContext with normal ctx param
Previously the entity store had a WithContext(ctx) method to pass in the context. This PR replaces that with the standard pattern passing context in as the first argument to the methods.
1 parent cb04dd0 commit df3c0ab

File tree

10 files changed

+128
-144
lines changed

10 files changed

+128
-144
lines changed

api/api_gomux.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ func (api *API) getEntitiesHandler(w http.ResponseWriter, r *http.Request) {
576576

577577
// Query data store (instrumented)
578578
rc.inst.Start("db")
579-
entities, err := api.es.WithContext(ctx).ReadEntities(rc.entityType, q, f)
579+
entities, err := api.es.ReadEntities(ctx, rc.entityType, q, f)
580580
rc.inst.Stop("db")
581581
if err != nil {
582582
api.readError(rc, w, err)
@@ -650,7 +650,7 @@ func (api *API) postEntitiesHandler(w http.ResponseWriter, r *http.Request) {
650650
}
651651

652652
// Write new entities to data store
653-
ids, err = api.es.WithContext(ctx).CreateEntities(rc.wo, entities)
653+
ids, err = api.es.CreateEntities(ctx, rc.wo, entities)
654654
rc.gm.Inc(metrics.Created, int64(len(ids)))
655655

656656
reply:
@@ -717,7 +717,7 @@ func (api *API) putEntitiesHandler(w http.ResponseWriter, r *http.Request) {
717717
}
718718

719719
// Patch all entities matching query
720-
entities, err = api.es.WithContext(ctx).UpdateEntities(rc.wo, q, patch)
720+
entities, err = api.es.UpdateEntities(ctx, rc.wo, q, patch)
721721
rc.gm.Val(metrics.UpdateBulk, int64(len(entities)))
722722
rc.gm.Inc(metrics.Updated, int64(len(entities)))
723723

@@ -764,7 +764,7 @@ func (api *API) deleteEntitiesHandler(w http.ResponseWriter, r *http.Request) {
764764
}
765765

766766
// Delete entities, returns the deleted entities
767-
entities, err = api.es.WithContext(ctx).DeleteEntities(rc.wo, q)
767+
entities, err = api.es.DeleteEntities(ctx, rc.wo, q)
768768
rc.gm.Val(metrics.DeleteBulk, int64(len(entities)))
769769
rc.gm.Inc(metrics.Deleted, int64(len(entities)))
770770

@@ -805,7 +805,7 @@ func (api *API) getEntityHandler(w http.ResponseWriter, r *http.Request) {
805805

806806
// Read the entity by ID
807807
q, _ := query.Translate("_id=" + rc.entityId)
808-
entities, err := api.es.WithContext(ctx).ReadEntities(rc.entityType, q, f)
808+
entities, err := api.es.ReadEntities(ctx, rc.entityType, q, f)
809809
if err != nil {
810810
api.readError(rc, w, err)
811811
return
@@ -838,7 +838,7 @@ func (api *API) getLabelsHandler(w http.ResponseWriter, r *http.Request) {
838838
rc.gm.Inc(metrics.ReadLabels, 1) // specific read type
839839

840840
q, _ := query.Translate("_id=" + rc.entityId)
841-
entities, err := api.es.WithContext(ctx).ReadEntities(rc.entityType, q, etre.QueryFilter{})
841+
entities, err := api.es.ReadEntities(ctx, rc.entityType, q, etre.QueryFilter{})
842842
if err != nil {
843843
api.readError(rc, w, err)
844844
return
@@ -893,7 +893,7 @@ func (api *API) postEntityHandler(w http.ResponseWriter, r *http.Request) {
893893
}
894894

895895
// Create new entity
896-
ids, err = api.es.WithContext(ctx).CreateEntities(rc.wo, []etre.Entity{newEntity})
896+
ids, err = api.es.CreateEntities(ctx, rc.wo, []etre.Entity{newEntity})
897897
if err == nil {
898898
rc.gm.Inc(metrics.Created, 1)
899899
}
@@ -947,7 +947,7 @@ func (api *API) putEntityHandler(w http.ResponseWriter, r *http.Request) {
947947
}
948948

949949
// Patch one entity by ID
950-
entities, err = api.es.WithContext(ctx).UpdateEntities(rc.wo, q, patch)
950+
entities, err = api.es.UpdateEntities(ctx, rc.wo, q, patch)
951951
if err != nil {
952952
goto reply
953953
} else if len(entities) == 0 {
@@ -991,7 +991,7 @@ func (api *API) deleteEntityHandler(w http.ResponseWriter, r *http.Request) {
991991
q, _ := query.Translate("_id=" + rc.entityId)
992992

993993
// Delete one entity by ID
994-
entities, err = api.es.WithContext(ctx).DeleteEntities(rc.wo, q)
994+
entities, err = api.es.DeleteEntities(ctx, rc.wo, q)
995995
if err != nil {
996996
goto reply
997997
} else if len(entities) == 0 {
@@ -1041,7 +1041,7 @@ func (api *API) deleteLabelHandler(w http.ResponseWriter, r *http.Request) {
10411041
}
10421042

10431043
// Delete label from entity
1044-
diff, err = api.es.WithContext(ctx).DeleteLabel(rc.wo, label)
1044+
diff, err = api.es.DeleteLabel(ctx, rc.wo, label)
10451045
if err != nil {
10461046
if err == etre.ErrEntityNotFound {
10471047
err = nil // delete is idempotent

api/api_test.go

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,8 @@ func TestClientQueryTimeout(t *testing.T) {
196196
// and plumbed all the way down to the entity.Store context
197197
var gotCtx context.Context
198198
store := mock.EntityStore{}
199-
store.WithContextFunc = func(ctx context.Context) entity.Store {
199+
store.ReadEntitiesFunc = func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
200200
gotCtx = ctx
201-
return store
202-
}
203-
store.ReadEntitiesFunc = func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
204201
return testEntitiesWithObjectIDs[0:1], nil
205202
}
206203
server := setup(t, defaultConfig, store)
@@ -242,24 +239,25 @@ func TestContextPropagation(t *testing.T) {
242239
// Make sure context values from the request are propagated all the way down to the entity.Store context
243240
var gotCtx context.Context
244241
store := mock.EntityStore{}
245-
store.WithContextFunc = func(ctx context.Context) entity.Store {
246-
gotCtx = ctx
247-
return store
248-
}
249242
// We're going to test all operations, so we need to set all of these funcs
250-
store.ReadEntitiesFunc = func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
243+
store.ReadEntitiesFunc = func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
244+
gotCtx = ctx
251245
return testEntitiesWithObjectIDs[0:1], nil
252246
}
253-
store.CreateEntitiesFunc = func(op entity.WriteOp, entities []etre.Entity) ([]string, error) {
247+
store.CreateEntitiesFunc = func(ctx context.Context, op entity.WriteOp, entities []etre.Entity) ([]string, error) {
248+
gotCtx = ctx
254249
return []string{testEntityIds[0]}, nil
255250
}
256-
store.UpdateEntitiesFunc = func(op entity.WriteOp, q query.Query, e etre.Entity) ([]etre.Entity, error) {
251+
store.UpdateEntitiesFunc = func(ctx context.Context, op entity.WriteOp, q query.Query, e etre.Entity) ([]etre.Entity, error) {
252+
gotCtx = ctx
257253
return testEntitiesWithObjectIDs[0:1], nil
258254
}
259-
store.DeleteEntitiesFunc = func(op entity.WriteOp, q query.Query) ([]etre.Entity, error) {
255+
store.DeleteEntitiesFunc = func(ctx context.Context, op entity.WriteOp, q query.Query) ([]etre.Entity, error) {
256+
gotCtx = ctx
260257
return testEntitiesWithObjectIDs[0:1], nil
261258
}
262-
store.DeleteLabelFunc = func(op entity.WriteOp, label string) (etre.Entity, error) {
259+
store.DeleteLabelFunc = func(ctx context.Context, op entity.WriteOp, label string) (etre.Entity, error) {
260+
gotCtx = ctx
263261
return testEntitiesWithObjectIDs[0], nil
264262
}
265263

api/bulk_write_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package api_test
44

55
import (
6+
"context"
67
"encoding/json"
78
"net/http"
89
"net/url"
@@ -32,7 +33,7 @@ func TestPostEntitiesOK(t *testing.T) {
3233
var gotWO entity.WriteOp
3334
var gotEntities []etre.Entity
3435
store := mock.EntityStore{
35-
CreateEntitiesFunc: func(wo entity.WriteOp, entities []etre.Entity) ([]string, error) {
36+
CreateEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, entities []etre.Entity) ([]string, error) {
3637
gotWO = wo
3738
gotEntities = entities
3839
return []string{"id1", "id2"}, nil
@@ -94,7 +95,7 @@ func TestPostEntitiesErrors(t *testing.T) {
9495
// Most importantly: CreateEntities() should _not_ be called.
9596
created := false
9697
store := mock.EntityStore{
97-
CreateEntitiesFunc: func(wo entity.WriteOp, entities []etre.Entity) ([]string, error) {
98+
CreateEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, entities []etre.Entity) ([]string, error) {
9899
created = true
99100
return []string{"id1", "id2"}, nil
100101
},
@@ -241,7 +242,7 @@ func TestPutEntitiesOK(t *testing.T) {
241242
var gotQuery query.Query
242243
var gotPatch etre.Entity
243244
store := mock.EntityStore{
244-
UpdateEntitiesFunc: func(wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
245+
UpdateEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
245246
gotWO = wo
246247
gotQuery = q
247248
gotPatch = patch
@@ -324,7 +325,7 @@ func TestPutEntitiesErrors(t *testing.T) {
324325
// metrics when any input is invalid. The UpdateEntities() should not be called.
325326
updated := false
326327
store := mock.EntityStore{
327-
UpdateEntitiesFunc: func(wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
328+
UpdateEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
328329
updated = true
329330
return []etre.Entity{}, nil
330331
},
@@ -485,7 +486,7 @@ func TestDeleteEntitiesOK(t *testing.T) {
485486
var gotWO entity.WriteOp
486487
var gotQuery query.Query
487488
store := mock.EntityStore{
488-
DeleteEntitiesFunc: func(wo entity.WriteOp, q query.Query) ([]etre.Entity, error) {
489+
DeleteEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, q query.Query) ([]etre.Entity, error) {
489490
gotWO = wo
490491
gotQuery = q
491492
return []etre.Entity{
@@ -563,7 +564,7 @@ func TestDeleteEntitiesErrors(t *testing.T) {
563564
// metrics when any input is invalid. The DeleteEntities() should not be called.
564565
deleted := false
565566
store := mock.EntityStore{
566-
DeleteEntitiesFunc: func(wo entity.WriteOp, q query.Query) ([]etre.Entity, error) {
567+
DeleteEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, q query.Query) ([]etre.Entity, error) {
567568
deleted = true
568569
return []etre.Entity{}, nil
569570
},

api/query_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestQueryBasic(t *testing.T) {
2828
var gotQuery query.Query
2929
var gotFilter etre.QueryFilter
3030
store := mock.EntityStore{
31-
ReadEntitiesFunc: func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
31+
ReadEntitiesFunc: func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
3232
gotQuery = q
3333
gotFilter = f
3434
return testEntitiesWithObjectIDs, nil
@@ -168,7 +168,7 @@ func TestQueryNoMatches(t *testing.T) {
168168
// is still 200 OK in this case because there's no error.
169169
var gotQuery query.Query
170170
store := mock.EntityStore{
171-
ReadEntitiesFunc: func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
171+
ReadEntitiesFunc: func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
172172
gotQuery = q
173173
return []etre.Entity{}, nil // no matching queries
174174
},
@@ -216,7 +216,7 @@ func TestQueryErrorsDatabaseError(t *testing.T) {
216216
// Test that GET /entities/:type?query=Q handles a database error correctly.
217217
// Db errors (and only db errors return HTTP 503 "Service Unavailable".
218218
store := mock.EntityStore{
219-
ReadEntitiesFunc: func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
219+
ReadEntitiesFunc: func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
220220
return nil, entity.DbError{Err: fmt.Errorf("fake error"), Type: "db-read"}
221221
},
222222
}
@@ -264,7 +264,7 @@ func TestQueryErrorsNoEntityType(t *testing.T) {
264264
// You can run "../test/coverage -test.run TestQueryErrorsNoEntityType" and
265265
// see that the handler is never called.
266266
store := mock.EntityStore{
267-
ReadEntitiesFunc: func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
267+
ReadEntitiesFunc: func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
268268
return nil, entity.DbError{Err: fmt.Errorf("fake error"), Type: "db-read"}
269269
},
270270
}
@@ -305,7 +305,7 @@ func TestQueryErrorsTimeout(t *testing.T) {
305305
// Test that GET /entities/:type?query=Q handles a database timeout correctly.
306306
// Db errors (and only db errors return HTTP 503 "Service Unavailable".
307307
store := mock.EntityStore{
308-
ReadEntitiesFunc: func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
308+
ReadEntitiesFunc: func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
309309
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
310310
defer cancel()
311311
<-ctx.Done()
@@ -351,7 +351,7 @@ func TestQueryErrorsTimeout(t *testing.T) {
351351
func TestResponseCompression(t *testing.T) {
352352
// Stand up the server
353353
store := mock.EntityStore{
354-
ReadEntitiesFunc: func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
354+
ReadEntitiesFunc: func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
355355
return testEntitiesWithObjectIDs, nil
356356
},
357357
}

api/single_entity_read_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package api_test
44

55
import (
6+
"context"
67
"fmt"
78
"net/http"
89
"net/url"
@@ -31,7 +32,7 @@ func TestGetEntityBasic(t *testing.T) {
3132
var gotQuery query.Query
3233
var gotFilter etre.QueryFilter
3334
store := mock.EntityStore{
34-
ReadEntitiesFunc: func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
35+
ReadEntitiesFunc: func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
3536
gotQuery = q
3637
gotFilter = f
3738
return testEntitiesWithObjectIDs[0:1], nil
@@ -82,7 +83,7 @@ func TestGetEntityReturnLabels(t *testing.T) {
8283
// that the URL param "labels=" is processed and passed along to the entity.Store.
8384
var gotFilter etre.QueryFilter
8485
store := mock.EntityStore{
85-
ReadEntitiesFunc: func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
86+
ReadEntitiesFunc: func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
8687
gotFilter = f
8788
return testEntitiesWithObjectIDs[0:1], nil
8889
},
@@ -127,7 +128,7 @@ func TestGetEntityNotFound(t *testing.T) {
127128
// We simulate this by making ReadEntities() below return an empty list which
128129
// the real entity.Store() does when no entity exists with the given _id.
129130
store := mock.EntityStore{
130-
ReadEntitiesFunc: func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
131+
ReadEntitiesFunc: func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
131132
return []etre.Entity{}, nil
132133
},
133134
}
@@ -160,7 +161,7 @@ func TestGetEntityErrors(t *testing.T) {
160161
read := false
161162
var dbError error
162163
store := mock.EntityStore{
163-
ReadEntitiesFunc: func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
164+
ReadEntitiesFunc: func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
164165
read = true
165166
return nil, dbError
166167
},
@@ -251,7 +252,7 @@ func TestGetEntityLabels(t *testing.T) {
251252
var gotQuery query.Query
252253
var gotFilter etre.QueryFilter
253254
store := mock.EntityStore{
254-
ReadEntitiesFunc: func(entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
255+
ReadEntitiesFunc: func(ctx context.Context, entityType string, q query.Query, f etre.QueryFilter) ([]etre.Entity, error) {
255256
gotQuery = q
256257
gotFilter = f
257258
return testEntitiesWithObjectIDs[0:1], nil

api/single_entity_write_test.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package api_test
44

55
import (
6+
"context"
67
"encoding/json"
78
"fmt"
89
"net/http"
@@ -33,7 +34,7 @@ func TestPostEntityOK(t *testing.T) {
3334
var gotWO entity.WriteOp
3435
var gotEntities []etre.Entity
3536
store := mock.EntityStore{
36-
CreateEntitiesFunc: func(wo entity.WriteOp, entities []etre.Entity) ([]string, error) {
37+
CreateEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, entities []etre.Entity) ([]string, error) {
3738
gotWO = wo
3839
gotEntities = entities
3940
return []string{"id1"}, nil
@@ -95,7 +96,7 @@ func TestPostEntityDuplicate(t *testing.T) {
9596
// Test that POST /entities/:type returns HTTP 403 Conflict on duplicate
9697
// which we simulate by returning what entity.Store would:
9798
store := mock.EntityStore{
98-
CreateEntitiesFunc: func(wo entity.WriteOp, entities []etre.Entity) ([]string, error) {
99+
CreateEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, entities []etre.Entity) ([]string, error) {
99100
// Real CreateEntities() always returns []string, not nil, because
100101
// it supports partial writes
101102
return []string{}, entity.DbError{Err: fmt.Errorf("dupe"), Type: "duplicate-entity"}
@@ -142,7 +143,7 @@ func TestPostEntityErrors(t *testing.T) {
142143
// Test that POST /entities/:type returns an error for any issue
143144
created := false
144145
store := mock.EntityStore{
145-
CreateEntitiesFunc: func(wo entity.WriteOp, entities []etre.Entity) ([]string, error) {
146+
CreateEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, entities []etre.Entity) ([]string, error) {
146147
created = true
147148
return []string{"id1"}, nil
148149
},
@@ -249,7 +250,7 @@ func TestPutEntityOK(t *testing.T) {
249250
var gotWO entity.WriteOp
250251
var gotQuery query.Query
251252
store := mock.EntityStore{
252-
UpdateEntitiesFunc: func(wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
253+
UpdateEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
253254
gotWO = wo
254255
gotQuery = q
255256
diff := []etre.Entity{
@@ -323,7 +324,7 @@ func TestPutEntityDuplicate(t *testing.T) {
323324
// Test that PUT /entities/:type/:id returns HTTP 403 Conflict on duplicate
324325
// which we simulate by returning what entity.Store would:
325326
store := mock.EntityStore{
326-
UpdateEntitiesFunc: func(wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
327+
UpdateEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
327328
return nil, entity.DbError{
328329
Type: "duplicate-entity", // the key to making this happen
329330
EntityId: testEntityIds[0],
@@ -373,7 +374,7 @@ func TestPutEntityNotFound(t *testing.T) {
373374
// Test that PUT /entities/:type/:id returns HTTP 404 when there's no entity
374375
// with the given id. In this case, the entity.Store returns an empty diff:
375376
store := mock.EntityStore{
376-
UpdateEntitiesFunc: func(wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
377+
UpdateEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
377378
return []etre.Entity{}, nil // no entities matched
378379
},
379380
}
@@ -411,7 +412,7 @@ func TestPutEntityErrors(t *testing.T) {
411412
// Test that PUT /entities/:type/:id returns errors unless all inputs are correct
412413
updated := false
413414
store := mock.EntityStore{
414-
UpdateEntitiesFunc: func(wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
415+
UpdateEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, q query.Query, patch etre.Entity) ([]etre.Entity, error) {
415416
updated = true
416417
return []etre.Entity{{"_id": testEntityId0, "_type": entityType, "_rev": int64(0)}}, nil
417418
},
@@ -579,7 +580,7 @@ func TestDeleteEntityOK(t *testing.T) {
579580
var gotWO entity.WriteOp
580581
var gotQuery query.Query
581582
store := mock.EntityStore{
582-
DeleteEntitiesFunc: func(wo entity.WriteOp, q query.Query) ([]etre.Entity, error) {
583+
DeleteEntitiesFunc: func(ctx context.Context, wo entity.WriteOp, q query.Query) ([]etre.Entity, error) {
583584
gotWO = wo
584585
gotQuery = q
585586
diff := []etre.Entity{
@@ -657,7 +658,7 @@ func TestDeleteLabel(t *testing.T) {
657658
var gotWO entity.WriteOp
658659
var gotLabel string
659660
store := mock.EntityStore{
660-
DeleteLabelFunc: func(wo entity.WriteOp, label string) (etre.Entity, error) {
661+
DeleteLabelFunc: func(ctx context.Context, wo entity.WriteOp, label string) (etre.Entity, error) {
661662
gotWO = wo
662663
gotLabel = label
663664
return etre.Entity{"_id": testEntityId0, "_type": entityType, "_rev": int64(0), "foo": "oldVal"}, nil

0 commit comments

Comments
 (0)