(t *testing.T)
| 103 | } |
| 104 | |
| 105 | func TestMergedEnumerate(t *testing.T) { |
| 106 | for _, tt := range mergedTests { |
| 107 | ctx := context.TODO() |
| 108 | var got []string |
| 109 | ch := make(chan blob.SizedRef) |
| 110 | errc := make(chan error) |
| 111 | limit := tt.limit |
| 112 | if limit == 0 { |
| 113 | limit = 1e9 |
| 114 | } |
| 115 | go func() { |
| 116 | errc <- MergedEnumerate(ctx, ch, tt.srcs, tt.after, limit) |
| 117 | }() |
| 118 | for sb := range ch { |
| 119 | got = append(got, sb.Ref.String()) |
| 120 | } |
| 121 | if err := <-errc; err != nil { |
| 122 | t.Errorf("%s. MergedEnumerate = %v", tt.name, err) |
| 123 | continue |
| 124 | } |
| 125 | if !reflect.DeepEqual(got, tt.want) { |
| 126 | t.Errorf("%s. different:\n got = %v\nwant = %v", tt.name, got, tt.want) |
| 127 | continue |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | func enumBlobs(v ...string) BlobEnumerator { |
| 133 | sort.Strings(v) |
nothing calls this directly
no test coverage detected