Fix golang-ci linter errors

Signed-off-by: z1cheng <imchench@gmail.com>
This commit is contained in:
z1cheng 2023-06-25 07:23:57 +00:00 committed by k8s-infra-cherrypick-robot
parent ab99e23bba
commit 2bb2d9ef15
10 changed files with 11 additions and 81 deletions

View file

@ -125,7 +125,7 @@ var _ = framework.DescribeAnnotation("affinitymode", func() {
framework.Sleep()
// validate, there is no backend to serve the request
response = request.WithCookies(cookies).Expect().Status(http.StatusServiceUnavailable)
request.WithCookies(cookies).Expect().Status(http.StatusServiceUnavailable)
// create brand new backends
replicas = 2

View file

@ -56,15 +56,8 @@ type deploymentOptions struct {
name string
namespace string
image string
port int32
replicas int
command []string
args []string
env []corev1.EnvVar
volumeMounts []corev1.VolumeMount
volumes []corev1.Volume
svcAnnotations map[string]string
setProbe bool
}
// WithDeploymentNamespace allows configuring the deployment's namespace

View file

@ -35,20 +35,4 @@ func (c *chain) fail(message string, args ...interface{}) {
}
c.failbit = true
c.reporter.Errorf(message, args...)
}
func (c *chain) reset() {
c.failbit = false
}
func (c *chain) assertFailed(r Reporter) {
if !c.failbit {
r.Errorf("expected chain is failed, but it's ok")
}
}
func (c *chain) assertOK(r Reporter) {
if c.failbit {
r.Errorf("expected chain is ok, but it's failed")
}
}
}

View file

@ -71,7 +71,7 @@ var _ = framework.IngressNginxDescribe("[Status] status update", func() {
f.NewEchoDeployment()
ing := f.EnsureIngress(framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, nil))
f.EnsureIngress(framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, nil))
f.WaitForNginxConfiguration(
func(cfg string) bool {
@ -84,7 +84,7 @@ var _ = framework.IngressNginxDescribe("[Status] status update", func() {
err = cmd.Process.Kill()
assert.Nil(ginkgo.GinkgoT(), err, "unexpected error terminating kubectl proxy")
ing, err = f.KubeClientSet.NetworkingV1().Ingresses(f.Namespace).Get(context.TODO(), host, metav1.GetOptions{})
ing, err := f.KubeClientSet.NetworkingV1().Ingresses(f.Namespace).Get(context.TODO(), host, metav1.GetOptions{})
assert.Nil(ginkgo.GinkgoT(), err, "unexpected error getting %s/%v Ingress", f.Namespace, host)
ing.Status.LoadBalancer.Ingress = []v1.IngressLoadBalancerIngress{}