Chore: Update k8s.io to v0.33.1 (#105307)
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -31,6 +32,8 @@ import (
|
||||
utilflowcontrol "k8s.io/apiserver/pkg/util/flowcontrol"
|
||||
featuregatetesting "k8s.io/component-base/featuregate/testing"
|
||||
"k8s.io/utils/ptr"
|
||||
|
||||
"github.com/grafana/grafana/pkg/apiserver/registry/generic"
|
||||
)
|
||||
|
||||
func RunTestWatch(ctx context.Context, t *testing.T, store storage.Interface) {
|
||||
@@ -1452,7 +1455,20 @@ func RunWatchSemantics(ctx context.Context, t *testing.T, store storage.Interfac
|
||||
}
|
||||
|
||||
if scenario.useCurrentRV {
|
||||
currentStorageRV, err := storage.GetCurrentResourceVersionFromStorage(ctx, store, func() runtime.Object { return &example.PodList{} }, KeyFunc("", ""), "")
|
||||
// Get the most recent RV for this namespace
|
||||
out := &example.PodList{}
|
||||
if err := store.GetList(ctx, KeyFunc(ns, ""), storage.ListOptions{
|
||||
Predicate: storage.SelectionPredicate{
|
||||
GetAttrs: generic.GetAttrs,
|
||||
Label: labels.Everything(),
|
||||
Field: fields.Everything(),
|
||||
Limit: 1,
|
||||
},
|
||||
}, out); err != nil {
|
||||
t.Fatalf("Unable to get list: %v", err)
|
||||
}
|
||||
|
||||
currentStorageRV, err := strconv.ParseInt(out.ResourceVersion, 10, 64)
|
||||
require.NoError(t, err)
|
||||
scenario.resourceVersion = fmt.Sprintf("%d", currentStorageRV)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user