Storage: Add command line tool to migrate legacy dashboards (and folders) to unified storage (#99199)

This commit is contained in:
Ryan McKinley
2025-02-11 19:57:46 +02:00
committed by GitHub
parent b6ea06f259
commit a5355fd66c
36 changed files with 3569 additions and 614 deletions
+24
View File
@@ -0,0 +1,24 @@
package sql
import (
"testing"
"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
func TestBatch(t *testing.T) {
t.Parallel()
t.Run("rv iterator", func(t *testing.T) {
t.Parallel()
rv := newBatchRV()
v0 := rv.next(&unstructured.Unstructured{})
v1 := rv.next(&unstructured.Unstructured{})
v2 := rv.next(&unstructured.Unstructured{})
require.True(t, v0 > 1000)
require.Equal(t, int64(1), v1-v0)
require.Equal(t, int64(1), v2-v1)
})
}