Skip to content

Commit

Permalink
cleanup test case where the error was expected on invalid host.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
harshanarayana committed Jun 17, 2023
1 parent 1f44d2d commit 74a733e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions klient/k8s/resources/resources_test.go
Expand Up @@ -30,7 +30,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/rest"
log "k8s.io/klog/v2"

"sigs.k8s.io/e2e-framework/klient/k8s"
Expand Down Expand Up @@ -98,17 +97,6 @@ func TestResNoConfig(t *testing.T) {
}
}

func TestResInvalidConfig(t *testing.T) {
cfg := &rest.Config{
Host: "invalid-host",
}

_, err := New(cfg)
if err == nil {
t.Error("expected panic while invoking Res with invalid k8s config")
}
}

func TestUpdate(t *testing.T) {
res, err := New(cfg)
if err != nil {
Expand Down

0 comments on commit 74a733e

Please sign in to comment.