diff --git a/internal/keyspan/bounded_test.go b/internal/keyspan/bounded_test.go index a20694f150..33f7fc7b08 100644 --- a/internal/keyspan/bounded_test.go +++ b/internal/keyspan/bounded_test.go @@ -60,7 +60,7 @@ func TestBoundedIter(t *testing.T) { buf.Reset() lower, upper := getBounds(td) iter.SetBounds(lower, upper) - RunIterCmd(td, &iter, &buf) + RunIterCmd(td.Input, &iter, &buf) return buf.String() default: return fmt.Sprintf("unrecognized command %q", td.Cmd) diff --git a/internal/keyspan/keyspanimpl/merging_iter_test.go b/internal/keyspan/keyspanimpl/merging_iter_test.go index 7e958f25c9..2425e6989d 100644 --- a/internal/keyspan/keyspanimpl/merging_iter_test.go +++ b/internal/keyspan/keyspanimpl/merging_iter_test.go @@ -69,7 +69,7 @@ func TestMergingIter(t *testing.T) { } var iter MergingIter iter.Init(cmp, keyspan.VisibleTransform(snapshot), new(MergingBuffers), iters...) - keyspan.RunIterCmd(td, &iter, &buf) + keyspan.RunIterCmd(td.Input, &iter, &buf) return buf.String() default: return fmt.Sprintf("unrecognized command %q", td.Cmd) diff --git a/internal/keyspan/test_utils.go b/internal/keyspan/test_utils.go index 16ce479b5f..7a1a599c84 100644 --- a/internal/keyspan/test_utils.go +++ b/internal/keyspan/test_utils.go @@ -13,7 +13,6 @@ import ( "strconv" "strings" - "github.com/cockroachdb/datadriven" "github.com/cockroachdb/errors" "github.com/cockroachdb/pebble/internal/dsl" ) @@ -381,8 +380,8 @@ func (p *probeIterator) WrapChildren(wrap WrapFn) { // RunIterCmd evaluates a datadriven command controlling an internal // keyspan.FragmentIterator, writing the results of the iterator operations to // the provided writer. -func RunIterCmd(td *datadriven.TestData, iter FragmentIterator, w io.Writer) { - lines := strings.Split(strings.TrimSpace(td.Input), "\n") +func RunIterCmd(tdInput string, iter FragmentIterator, w io.Writer) { + lines := strings.Split(strings.TrimSpace(tdInput), "\n") for i, line := range lines { if i > 0 { fmt.Fprintln(w) diff --git a/internal/keyspan/truncate_test.go b/internal/keyspan/truncate_test.go index ecb1766d15..8e39f3589f 100644 --- a/internal/keyspan/truncate_test.go +++ b/internal/keyspan/truncate_test.go @@ -88,7 +88,7 @@ func TestTruncate(t *testing.T) { case "saved-iter": var buf bytes.Buffer - RunIterCmd(d, savedIter, &buf) + RunIterCmd(d.Input, savedIter, &buf) return buf.String() default: