Skip to content

Commit 19806dd

Browse files
committed
chore: Fix linter errors in /test
1 parent 7e6126a commit 19806dd

File tree

7 files changed

+127
-124
lines changed

7 files changed

+127
-124
lines changed

.golangci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ version: "2"
33
run:
44
timeout: 10m
55
tests: false
6+
linters:
7+
exclusions:
8+
paths:
9+
- ^test/

test/finalizer_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ func testFinalizer() {
8181

8282
It("should survive loading a minimal config", func() {
8383
// switch EDS on
84-
createOrUpdateGatewayClass(testGwClass, nil)
85-
createOrUpdateGatewayConfig(testGwConfig, nil)
86-
createOrUpdateGateway(testGw, nil)
87-
createOrUpdateEndpointSlice(testEndpointSlice, nil)
84+
createOrUpdateGatewayClass(ctx, k8sClient, testGwClass, nil)
85+
createOrUpdateGatewayConfig(ctx, k8sClient, testGwConfig, nil)
86+
createOrUpdateGateway(ctx, k8sClient, testGw, nil)
87+
createOrUpdateEndpointSlice(ctx, k8sClient, testEndpointSlice, nil)
8888

8989
ctrl.Log.Info("loading default Dataplane")
9090
current := &stnrgwv1.Dataplane{ObjectMeta: metav1.ObjectMeta{
@@ -211,10 +211,10 @@ func testFinalizer() {
211211

212212
It("should survive the event of adding a route", func() {
213213
ctrl.Log.Info("loading UDPRoute")
214-
createOrUpdateUDPRoute(testUDPRoute, nil)
214+
createOrUpdateUDPRoute(ctx, k8sClient, testUDPRoute, nil)
215215

216216
ctrl.Log.Info("loading backend Service")
217-
createOrUpdateService(testSvc, nil)
217+
createOrUpdateService(ctx, k8sClient, testSvc, nil)
218218

219219
ctrl.Log.Info("trying to load STUNner config")
220220
Eventually(checkConfig(ch, func(c *stnrv1.StunnerConfig) bool {

test/legacy_mode_endpoints_controller_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ func testLegacyModeEndpointController() {
5555
config.EnableEndpointDiscovery = true
5656
config.EnableRelayToClusterIP = true
5757

58-
createOrUpdateGatewayClass(testGwClass, nil)
59-
createOrUpdateGatewayConfig(testGwConfig, nil)
60-
createOrUpdateGateway(testGw, nil)
61-
createOrUpdateUDPRoute(testUDPRoute, nil)
62-
createOrUpdateService(testSvc, nil)
63-
createOrUpdateEndpoints(testEndpoint, nil)
58+
createOrUpdateGatewayClass(ctx, k8sClient, testGwClass, nil)
59+
createOrUpdateGatewayConfig(ctx, k8sClient, testGwConfig, nil)
60+
createOrUpdateGateway(ctx, k8sClient, testGw, nil)
61+
createOrUpdateUDPRoute(ctx, k8sClient, testUDPRoute, nil)
62+
createOrUpdateService(ctx, k8sClient, testSvc, nil)
63+
createOrUpdateEndpoints(ctx, k8sClient, testEndpoint, nil)
6464

6565
lookupKey := types.NamespacedName{
6666
Name: opdefault.DefaultConfigMapName,

0 commit comments

Comments
 (0)