mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 22:40:35 +00:00
client-go/kubernetes_test/fake_client_test: TestDoesClientSupportWatchListSemantics
This commit is contained in:
@@ -26,8 +26,16 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/client-go/kubernetes/fake"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
"k8s.io/client-go/util/watchlist"
|
||||
)
|
||||
|
||||
func TestDoesClientSupportWatchListSemantics(t *testing.T) {
|
||||
target := fake.NewClientset()
|
||||
if !watchlist.DoesClientNotSupportWatchListSemantics(target) {
|
||||
t.Fatalf("NewSimpleClientset should NOT support WatchList semantics")
|
||||
}
|
||||
}
|
||||
|
||||
// This test proves that the kube fake client does not return GVKs. This is consistent with actual client (see tests below)
|
||||
// and should not be changed unless the decoding behavior and somehow literal creation (`&corev1.ConfigMap{}`) behavior change.
|
||||
func Test_ConfigMapFakeClient(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user