fix net-tiers e2e test

This commit is contained in:
Minhan Xia 2021-06-08 14:55:15 -07:00
parent fbf2d2df26
commit a84b91f08c

View File

@ -93,7 +93,7 @@ var _ = common.SIGDescribe("Services [Slow]", func() {
// Test 2: re-create a LB of a different tier for the updated Service.
ginkgo.By("updating the Service to use the premium (default) tier")
svc, err = jig.UpdateService(func(svc *v1.Service) {
clearNetworkTier(svc)
setNetworkTier(svc, string(gcecloud.NetworkTierAnnotationPremium))
})
framework.ExpectNoError(err)
// Verify that service has been updated properly.
@ -212,14 +212,6 @@ func setNetworkTier(svc *v1.Service, tier string) {
svc.ObjectMeta.Annotations[key] = tier
}
func clearNetworkTier(svc *v1.Service) {
key := gcecloud.NetworkTierAnnotationKey
if svc.ObjectMeta.Annotations == nil {
return
}
delete(svc.ObjectMeta.Annotations, key)
}
// TODO: add retries if this turns out to be flaky.
func reserveRegionalAddress(cloud *gcecloud.Cloud, name string, netTier cloud.NetworkTier) (string, error) {
Addr := &compute.Address{