Skip to content

Commit

Permalink
Merge pull request #423 from Lyt99/fix/e2e
Browse files Browse the repository at this point in the history
fix e2e test compile error and failure
  • Loading branch information
k8s-ci-robot authored Oct 17, 2024
2 parents 84b53e1 + f97eaa6 commit a1c3796
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
20 changes: 0 additions & 20 deletions test/e2e/testcase/service/nlbv2/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,26 +417,6 @@ func RunListenerTestCases(f *framework.Framework) {
gomega.Expect(err).To(gomega.BeNil())
})

ginkgo.It("alpn: off -> on without alpn-policy", func() {
oldsvc, err := f.Client.KubeClient.CreateNLBServiceByAnno(map[string]string{
annotation.Annotation(annotation.LoadBalancerId): options.TestConfig.InternetNetworkLoadBalancerID,
annotation.Annotation(annotation.ProtocolPort): "tcpssl:443",
annotation.Annotation(annotation.CertID): options.TestConfig.NLBCertID,
annotation.Annotation(annotation.OverrideListener): "true",
annotation.Annotation(annotation.AlpnEnabled): string(model.OffFlag),
})
gomega.Expect(err).To(gomega.BeNil())
err = f.ExpectNetworkLoadBalancerEqual(oldsvc)
gomega.Expect(err).To(gomega.BeNil())

newsvc := oldsvc.DeepCopy()
newsvc.Annotations[annotation.Annotation(annotation.AlpnEnabled)] = string(model.OnFlag)
newsvc, err = f.Client.KubeClient.PatchService(oldsvc, newsvc)
gomega.Expect(err).To(gomega.BeNil())
err = f.ExpectNetworkLoadBalancerEqual(newsvc)
gomega.Expect(err).NotTo(gomega.BeNil())
})

ginkgo.It("alpn: on -> off", func() {
oldsvc, err := f.Client.KubeClient.CreateNLBServiceByAnno(map[string]string{
annotation.Annotation(annotation.LoadBalancerId): options.TestConfig.InternetNetworkLoadBalancerID,
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/testcase/service/nlbv2/loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"k8s.io/cloud-provider-alibaba-cloud/pkg/controller/helper"
"k8s.io/cloud-provider-alibaba-cloud/pkg/controller/service/reconcile/annotation"
"k8s.io/cloud-provider-alibaba-cloud/pkg/model"
"k8s.io/cloud-provider-alibaba-cloud/pkg/model/nlb"
nlbmodel "k8s.io/cloud-provider-alibaba-cloud/pkg/model/nlb"
"k8s.io/cloud-provider-alibaba-cloud/test/e2e/framework"
"k8s.io/cloud-provider-alibaba-cloud/test/e2e/options"
"strings"
Expand Down Expand Up @@ -575,7 +575,7 @@ func RunLoadBalancerTestCases(f *framework.Framework) {
_, nlb, err := f.FindNetworkLoadBalancer()
gomega.Expect(err).To(gomega.BeNil())
key := helper.TAGKEY
err = f.Client.CloudClient.UntagNLBResources(context.TODO(), nlb.LoadBalancerAttribute.LoadBalancerId, nlb.LoadBalancerTagType, []*string{&key})
err = f.Client.CloudClient.UntagNLBResources(context.TODO(), nlb.LoadBalancerAttribute.LoadBalancerId, nlbmodel.LoadBalancerTagType, []*string{&key})
gomega.Expect(err).To(gomega.BeNil())

err = f.Client.KubeClient.ScaleDeployment(0)
Expand Down Expand Up @@ -610,7 +610,7 @@ func RunLoadBalancerTestCases(f *framework.Framework) {
_, slb, err := f.FindNetworkLoadBalancer()
gomega.Expect(err).To(gomega.BeNil())
key := helper.TAGKEY
err = f.Client.CloudClient.UntagNLBResources(context.TODO(), slb.LoadBalancerAttribute.LoadBalancerId, nlb.LoadBalancerTagType, []*string{&key})
err = f.Client.CloudClient.UntagNLBResources(context.TODO(), slb.LoadBalancerAttribute.LoadBalancerId, nlbmodel.LoadBalancerTagType, []*string{&key})
gomega.Expect(err).To(gomega.BeNil())

err = f.Client.KubeClient.ScaleDeployment(0)
Expand Down

0 comments on commit a1c3796

Please sign in to comment.