diff --git a/x-pack/filebeat/input/cel/input_test.go b/x-pack/filebeat/input/cel/input_test.go index 6c1f90a60dda..d9501b958fdd 100644 --- a/x-pack/filebeat/input/cel/input_test.go +++ b/x-pack/filebeat/input/cel/input_test.go @@ -1977,7 +1977,7 @@ func TestInput(t *testing.T) { t.Errorf("unexpected number of cursors events: got:%d want at least:%d", len(client.cursors), len(test.wantCursor)) test.wantCursor = test.wantCursor[:len(client.published)] } - client.published = client.published[:len(test.want)] + client.cursors = client.cursors[:len(test.wantCursor)] for i, got := range client.cursors { if !reflect.DeepEqual(mapstr.M(got), mapstr.M(test.wantCursor[i])) { t.Errorf("unexpected cursor for event %d: got:- want:+\n%s", i, cmp.Diff(got, test.wantCursor[i]))