Skip to content

Commit

Permalink
Merge pull request #958 from skmatti/upgrade-test-fix
Browse files Browse the repository at this point in the history
Bugfix: Fix ingress passed to postUpgrade
  • Loading branch information
k8s-ci-robot authored Nov 22, 2019
2 parents 99b6ef7 + 894da95 commit 7008288
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cmd/e2e-test/upgrade/basic_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,23 @@ func (bh *BasicHTTP) PreUpgrade() error {
}
bh.t.Logf("Echo service created (%s/%s)", bh.s.Namespace, svcName)

ing := fuzz.NewIngressBuilder(bh.s.Namespace, ingName, "").
bh.ing = fuzz.NewIngressBuilder(bh.s.Namespace, ingName, "").
AddPath("foo.com", "/", svcName, port80).
Build()
ingKey := common.NamespacedName(ing)
ingKey := common.NamespacedName(bh.ing)
bh.crud = e2e.IngressCRUD{C: bh.framework.Clientset}
if _, err := bh.crud.Create(ing); err != nil {
if _, err := bh.crud.Create(bh.ing); err != nil {
bh.t.Fatalf("error creating Ingress %s: %v", ingKey, err)
}
bh.t.Logf("Ingress created (%s)", ingKey)

if bh.ing, err = e2e.UpgradeTestWaitForIngress(bh.s, ing, &e2e.WaitForIngressOptions{ExpectUnreachable: true}); err != nil {
ing, err := e2e.UpgradeTestWaitForIngress(bh.s, bh.ing, &e2e.WaitForIngressOptions{ExpectUnreachable: true})
if err != nil {
bh.t.Fatalf("error waiting for Ingress %s to stabilize: %v", ingKey, err)
}
bh.t.Logf("GCLB resources created (%s)", ingKey)

if _, err := e2e.WhiteboxTest(bh.ing, bh.s, bh.framework.Cloud, ""); err != nil {
if _, err := e2e.WhiteboxTest(ing, bh.s, bh.framework.Cloud, ""); err != nil {
bh.t.Fatalf("e2e.WhiteboxTest(%s, ...) = %v, want nil", ingKey, err)
}
return nil
Expand Down

0 comments on commit 7008288

Please sign in to comment.