Skip to content

Commit e4de7d0

Browse files
committed
fix merge conflicts
1 parent 249ce97 commit e4de7d0

File tree

8 files changed

+64
-73
lines changed

8 files changed

+64
-73
lines changed

test/e2e/admission_controller.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package e2e
1919

2020
import (
2121
"context"
22-
"fmt"
2322
"strings"
2423
"time"
2524

@@ -56,13 +55,12 @@ var _ = describe("Admission controller tests", func() {
5655

5756
It("Admission controller should inject platform environment variables [Zalando]", func() {
5857
nameprefix := "deployment-info-test"
59-
podname := fmt.Sprintf("deployment-info-test-pod")
6058
var replicas int32 = 1
6159
ns := f.Namespace.Name
6260

6361
By("Creating deployment " + nameprefix + " in namespace " + ns)
6462

65-
deployment := createDeploymentWithDeploymentInfo(nameprefix+"-", ns, podname, replicas)
63+
deployment := createDeploymentWithDeploymentInfo(nameprefix+"-", ns, replicas)
6664
_, err := cs.AppsV1().Deployments(ns).Create(context.TODO(), deployment, metav1.CreateOptions{})
6765
Expect(err).NotTo(HaveOccurred())
6866
labelSelector, err := metav1.LabelSelectorAsSelector(deployment.Spec.Selector)
@@ -175,7 +173,7 @@ func createInvalidOwnerPod(namespace, podname string) *v1.Pod {
175173
}
176174
}
177175

178-
func createDeploymentWithDeploymentInfo(nameprefix, namespace, podname string, replicas int32) *appsv1.Deployment {
176+
func createDeploymentWithDeploymentInfo(nameprefix, namespace string, replicas int32) *appsv1.Deployment {
179177
zero := int64(0)
180178
return &appsv1.Deployment{
181179
ObjectMeta: metav1.ObjectMeta{

test/e2e/authorisation_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,7 @@ func verifyResponse(status int, body []byte, test testItem) {
411411
}
412412

413413
var _ = describe("Authorization tests [Authorization] [RBAC] [Zalando]", func() {
414-
should := fmt.Sprintf(
415-
"should validate permissions for [Authorization] [RBAC] [Zalando]",
416-
)
414+
should := "should validate permissions for [Authorization] [RBAC] [Zalando]"
417415
It(should, func() {
418416
conf, err := framework.LoadConfig()
419417
Expect(err).NotTo(HaveOccurred()) // BDD = Because :DDD

test/e2e/gpu.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ var _ = describe("GPU job processing", func() {
6161
}
6262
n := p.Status.ContainerStatuses[0].State.Terminated.ExitCode
6363
if n != 0 {
64-
framework.ExpectNoError(fmt.Errorf("Expected POD %s to terminate with exit code 0", pod.Name))
64+
framework.ExpectNoError(fmt.Errorf("expected POD %s to terminate with exit code 0", pod.Name))
6565
return
6666
}
6767
logs, err := getPodLogs(cs, ns, pod.Name, "cuda-vector-add", false)

test/e2e/ingress.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ var ___ = describe("Ingress tests paths", func() {
478478

479479
By(fmt.Sprintf("Testing for ingress %s/%s we want to get a 200 for path %s without change from the other path", ingressUpdate.Namespace, ingressUpdate.Name, bepath))
480480
beurl = "https://" + hostName + bepath
481-
bereq, err = http.NewRequest("GET", beurl, nil)
481+
bereq, _ = http.NewRequest("GET", beurl, nil)
482482
resp, err = getAndWaitResponse(rt, bereq, 10*time.Second, http.StatusOK)
483483
Expect(err).NotTo(HaveOccurred())
484484
Expect(resp.StatusCode).To(Equal(http.StatusOK))
@@ -601,7 +601,7 @@ var ____ = describe("Ingress tests custom routes", func() {
601601
reqRedirectURL := resp.Header.Get("Location")
602602
By(fmt.Sprintf("Testing for ingress %s/%s rediretc Location we want to get a 200 for URL %s", ingressUpdate.Namespace, ingressUpdate.Name, reqRedirectURL))
603603
Expect(redirectDestinationURL).To(Equal(reqRedirectURL))
604-
redirectreq, err := http.NewRequest("GET", reqRedirectURL, nil)
604+
redirectreq, _ := http.NewRequest("GET", reqRedirectURL, nil)
605605
resp, err = getAndWaitResponse(rt, redirectreq, 10*time.Second, http.StatusOK)
606606
Expect(err).NotTo(HaveOccurred())
607607
Expect(resp.StatusCode).To(Equal(http.StatusOK))
@@ -780,7 +780,7 @@ var _____ = describe("Ingress tests paths", func() {
780780

781781
By(fmt.Sprintf("Testing for ingress %s/%s we want to get a 200 for path %s without change from the other path", ingressUpdate.Namespace, ingressUpdate.Name, bepath))
782782
beurl = "https://" + hostName + bepath
783-
bereq, err = http.NewRequest("GET", beurl, nil)
783+
bereq, _ = http.NewRequest("GET", beurl, nil)
784784
resp, err = getAndWaitResponse(rt, bereq, 10*time.Second, http.StatusOK)
785785
Expect(err).NotTo(HaveOccurred())
786786
Expect(resp.StatusCode).To(Equal(http.StatusOK))
@@ -790,7 +790,7 @@ var _____ = describe("Ingress tests paths", func() {
790790

791791
By(fmt.Sprintf("Testing for ingress %s/%s we want to get a 200 for path %s/path/prefix/match and pathType Prefix", ingressUpdate.Namespace, ingressUpdate.Name, bepath2))
792792
beurl = "https://" + hostName + bepath2 + "/path/prefix/match"
793-
bereq, err = http.NewRequest("GET", beurl, nil)
793+
bereq, _ = http.NewRequest("GET", beurl, nil)
794794
resp, err = getAndWaitResponse(rt, bereq, 10*time.Second, http.StatusOK)
795795
Expect(err).NotTo(HaveOccurred())
796796
Expect(resp.StatusCode).To(Equal(http.StatusOK))
@@ -913,7 +913,7 @@ var ______ = describe("Ingress tests custom routes", func() {
913913
reqRedirectURL := resp.Header.Get("Location")
914914
By(fmt.Sprintf("Testing for ingress %s/%s rediretc Location we want to get a 200 for URL %s", ingressUpdate.Namespace, ingressUpdate.Name, reqRedirectURL))
915915
Expect(redirectDestinationURL).To(Equal(reqRedirectURL))
916-
redirectreq, err := http.NewRequest("GET", reqRedirectURL, nil)
916+
redirectreq, _ := http.NewRequest("GET", reqRedirectURL, nil)
917917
resp, err = getAndWaitResponse(rt, redirectreq, 10*time.Second, http.StatusOK)
918918
Expect(err).NotTo(HaveOccurred())
919919
Expect(resp.StatusCode).To(Equal(http.StatusOK))

test/e2e/kube_metrics_adapter_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ type CustomMetricTestCase struct {
176176
rgClient rgclient.Interface
177177
jig *ingress.TestJig
178178
deployment *appsv1.Deployment
179-
pod *corev1.Pod
180179
initialReplicas int
181180
scaledReplicas int
182181
ingress *netv1.Ingress

test/e2e/node_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
admissionapi "k8s.io/pod-security-admission/api"
1616

1717
. "github.com/onsi/ginkgo/v2"
18-
"github.com/onsi/gomega"
1918
. "github.com/onsi/gomega"
2019
)
2120

@@ -220,6 +219,6 @@ var _ = describe("Node tests", func() {
220219
framework.ExpectNoError(e2epod.WaitForPodNotFoundInNamespace(ctx, f.ClientSet, pod.Name, pod.Namespace, framework.PodDeleteTimeout))
221220

222221
_, err = cs.CoreV1().Nodes().Get(ctx, nodeName, metav1.GetOptions{})
223-
gomega.Expect(apierrors.IsNotFound(err)).To(gomega.BeTrue(), "node should not be found")
222+
Expect(apierrors.IsNotFound(err)).To(BeTrue(), "node should not be found")
224223
})
225224
})

test/e2e/routegroup.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,14 @@ rBackend4: Path("/router-response") -> inlineContent("NOT OK") -> <shunt>;
269269

270270
// response for / is from our backend
271271
By("checking the response code of a request without required request header, we can check if predicate match works correctly")
272-
req, err := http.NewRequest("GET", "https://"+hostName+"/backend", nil)
272+
req, _ := http.NewRequest("GET", "https://"+hostName+"/backend", nil)
273273
resp, err = waitForResponseReturnResponse(req, 10*time.Minute, isNotFound, false)
274274
Expect(err).NotTo(HaveOccurred())
275275
resp.Body.Close()
276276

277277
// checking backend route with predicates and filters
278278
By("checking the response status code for a request to /backend without correct headers we should get 404")
279-
err = waitForResponse("https://"+hostName+"/backend", "https", 10*time.Minute, isNotFound, false)
279+
waitForResponse("https://"+hostName+"/backend", "https", 10*time.Minute, isNotFound, false)
280280
By("checking the response for a request to /backend with the right header we know if we got the correct route")
281281
req, err = http.NewRequest("GET", "https://"+hostName+"/backend", nil)
282282
Expect(err).NotTo(HaveOccurred())
@@ -390,7 +390,7 @@ rBackend: Path("/backend") -> inlineContent("%s") -> <shunt>;
390390
return code == http.StatusTooManyRequests
391391
}, false)
392392
Expect(err).NotTo(HaveOccurred())
393-
Expect(s).To(Equal(expectedResponse))
393+
Expect(resp).To(Equal(expectedResponse))
394394
})
395395

396396
It("Should create blue-green routes [RouteGroup] [Zalando]", func() {
@@ -571,7 +571,7 @@ rBackend: Path("/blue-green") -> status(202) -> inlineContent("%s") -> <shunt>;`
571571

572572
// RouteGroup
573573
By("Creating a routegroup with name " + serviceName + "-" + serviceName2 + " in namespace " + ns + " with hostname " + hostName)
574-
rg := createRouteGroupWithBackends(serviceName+"-"+serviceName2, hostName, ns, labels, nil, port,
574+
rg := createRouteGroupWithBackends(serviceName+"-"+serviceName2, hostName, ns, labels, nil,
575575
[]rgv1.RouteGroupBackend{
576576
{
577577
Name: expectedResponse,

0 commit comments

Comments
 (0)