210
}
211
213
>
filter := newChasmNodeMapsAllFilter()
214
>
215
>
// Insert 15 rows.
216
>
var initialRows []sqlplugin.ChasmNodeMapsRow
217
>
for range 15 {
218
>
initialRows = append(initialRows, newChasmRowFromFilter(filter))
219
>
}
220
221
// Delete a third of the inserted rows.
223
>
var deletedPaths []string
224
>
for _, row := range initialRows[:pivot] {
225
>
deletedPaths = append(deletedPaths, row.ChasmPath)
226
>
}
227
228
// Replace another third of the inserted rows.
230
>
for i := range pivot {
231
>
path := initialRows[i+pivot].ChasmPath
232
>
updatedRows[i] = newChasmRowFromFilter(filter)
233
>
updatedRows[i].ChasmPath = path
234
>
}
235
236
// Last third of initial batch, and updated rows, remain.
238
>
239
>
tc := &testCase{
240
>
InsertRows: initialRows,
241
>
ReplaceRows: updatedRows,
242
>
DeleteRows: &sqlplugin.ChasmNodeMapsFilter{
243
>
ShardID: filter.ShardID,
244
>
NamespaceID: filter.NamespaceID,
245
>
WorkflowID: filter.WorkflowID,
246
>
RunID: filter.RunID,
247
>
ChasmPaths: deletedPaths,
248
>
},
249
>
ExpectedRowsFilter: filter,
250
>
ExpectedRows: expectedRows,
251
>
}
252
>
s.runTestCase(tc)
253
}