Skip to content

Commit 8fe40be

Browse files
harshanarayanamatrus2
authored andcommitted
cleanup test case where the error was expected on invalid host.
New changes done to the controller-runtime to make the rest mapper truly lazy in nature now means that the connection is never really validated until the first connection is made. So the current test is basically of no use anymore. Cleaning them up. xref: kubernetes-sigs/controller-runtime#2296
1 parent 8ffdcc5 commit 8fe40be

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

klient/k8s/resources/resources_test.go

-12
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import (
3030
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3131
"k8s.io/apimachinery/pkg/labels"
3232
"k8s.io/apimachinery/pkg/types"
33-
"k8s.io/client-go/rest"
3433
log "k8s.io/klog/v2"
3534

3635
"sigs.k8s.io/e2e-framework/klient/k8s"
@@ -98,17 +97,6 @@ func TestResNoConfig(t *testing.T) {
9897
}
9998
}
10099

101-
func TestResInvalidConfig(t *testing.T) {
102-
cfg := &rest.Config{
103-
Host: "invalid-host",
104-
}
105-
106-
_, err := New(cfg)
107-
if err == nil {
108-
t.Error("expected panic while invoking Res with invalid k8s config")
109-
}
110-
}
111-
112100
func TestUpdate(t *testing.T) {
113101
res, err := New(cfg)
114102
if err != nil {

0 commit comments

Comments
 (0)