Skip to content

Commit 66b7105

Browse files
committed
Update TestMustCreateKubernetesClient to only assert client creation
1 parent 4a6e84e commit 66b7105

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

internal/framework/helpers/helpers_test.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
package helpers_test
22

33
import (
4-
"context"
54
"testing"
65
"text/template"
76

87
. "github.com/onsi/gomega"
9-
controllerruntime "sigs.k8s.io/controller-runtime"
108
"sigs.k8s.io/controller-runtime/pkg/client"
119
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"
1210
gatewayv1alpha3 "sigs.k8s.io/gateway-api/apis/v1alpha3"
1311

14-
ngfAPIv1alpha1 "github.com/nginx/nginx-gateway-fabric/v2/apis/v1alpha1"
15-
1612
"github.com/nginx/nginx-gateway-fabric/v2/internal/framework/helpers"
1713
)
1814

@@ -143,19 +139,4 @@ func TestMustCreateKubernetesClient(t *testing.T) {
143139

144140
g.Expect(err).ToNot(HaveOccurred())
145141
g.Expect(k8sClient).ToNot(BeNil())
146-
147-
// Check that the client can be used to list namespaces
148-
nginxGateway := &ngfAPIv1alpha1.NginxGateway{
149-
ObjectMeta: controllerruntime.ObjectMeta{
150-
Name: helpers.UniqueResourceName("test-nginx-gateway"),
151-
Namespace: "default",
152-
},
153-
}
154-
// Clean up after test
155-
defer func() {
156-
_ = k8sClient.Delete(context.Background(), nginxGateway)
157-
}()
158-
err = k8sClient.Create(context.Background(), nginxGateway)
159-
g.Expect(err).ToNot(HaveOccurred())
160-
g.Expect(nginxGateway).ToNot(BeNil())
161142
}

0 commit comments

Comments
 (0)