MCPcopy
hub / github.com/garethgeorge/backrest / getOperations

Function getOperations

internal/api/syncapi/syncapi_test.go:543–552  ·  view source on GitHub ↗
(t *testing.T, oplog *oplog.OpLog, query oplog.Query)

Source from the content-addressed store, hash-verified

541}
542
543func getOperations(t *testing.T, oplog *oplog.OpLog, query oplog.Query) []*v1.Operation {
544 ops := []*v1.Operation{}
545 if err := oplog.Query(query, func(op *v1.Operation) error {
546 ops = append(ops, op)
547 return nil
548 }); err != nil {
549 t.Fatalf("failed to get operations: %v", err)
550 }
551 return ops
552}
553
554func tryExpectExactOperations(t *testing.T, ctx context.Context, peer *peerUnderTest, query oplog.Query, wantOps []*v1.Operation, message string) {
555 err := testutil.Retry(t, ctx, func() error {

Callers 4

tryExpectExactOperationsFunction · 0.70
assertOpsConvergeFunction · 0.70

Calls 1

QueryStruct · 0.92

Tested by

no test coverage detected