Merge pull request #59364 from rramkumar1/ingress-upgrade-fix

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Patch ingress upgrade test to ignore checking certain GCP resources

**What this PR does / why we need it**:
In certain situations, GCP resources after an upgrade or downgrade will be different because of semantic changes to the glbc. Therefore in the test, we need to account for this difference and make sure the test does not fail because of it. 


```release-note
None
```

cc @MrHohn 
/assign @bowei
This commit is contained in:
Kubernetes Submit Queue 2018-02-07 14:04:03 -08:00 committed by GitHub
commit 0caa20c65f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,6 +176,15 @@ func (t *IngressUpgradeTest) verify(f *framework.Framework, done <-chan struct{}
By("comparing GCP resources post-upgrade")
postUpgradeResourceStore := &GCPResourceStore{}
t.populateGCPResourceStore(postUpgradeResourceStore)
// Ignore certain fields in compute.Firewall that we know will change
// due to the upgrade/downgrade.
// TODO(rramkumar): Remove this once glbc 0.9.8 is released.
t.resourceStore.Fw.Allowed = nil
t.resourceStore.Fw.SourceRanges = nil
postUpgradeResourceStore.Fw.Allowed = nil
postUpgradeResourceStore.Fw.SourceRanges = nil
framework.ExpectNoError(compareGCPResourceStores(t.resourceStore, postUpgradeResourceStore, func(v1 reflect.Value, v2 reflect.Value) error {
i1 := v1.Interface()
i2 := v2.Interface()