Skip to content

Commit

Permalink
Merge pull request #1726 from oilbeater/fix/deprecated
Browse files Browse the repository at this point in the history
fix: replace deprecated methods.
  • Loading branch information
aledbf authored Nov 19, 2017
2 parents 8eb6a94 + a3136aa commit b0eb1cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/ingress/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func runUpdate(ing *extensions.Ingress, status []apiv1.LoadBalancerIngress,
return true, nil
}

ingClient := client.Extensions().Ingresses(ing.Namespace)
ingClient := client.ExtensionsV1beta1().Ingresses(ing.Namespace)

currIng, err := ingClient.Get(ing.Name, metav1.GetOptions{})
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions internal/ingress/status/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func TestStatusActions(t *testing.T) {
newIPs := []apiv1.LoadBalancerIngress{{
IP: "11.0.0.2",
}}
fooIngress1, err1 := fk.Client.Extensions().Ingresses(apiv1.NamespaceDefault).Get("foo_ingress_1", metav1.GetOptions{})
fooIngress1, err1 := fk.Client.ExtensionsV1beta1().Ingresses(apiv1.NamespaceDefault).Get("foo_ingress_1", metav1.GetOptions{})
if err1 != nil {
t.Fatalf("unexpected error")
}
Expand All @@ -298,7 +298,7 @@ func TestStatusActions(t *testing.T) {
fk.Shutdown()
// ingress should be empty
newIPs2 := []apiv1.LoadBalancerIngress{}
fooIngress2, err2 := fk.Client.Extensions().Ingresses(apiv1.NamespaceDefault).Get("foo_ingress_1", metav1.GetOptions{})
fooIngress2, err2 := fk.Client.ExtensionsV1beta1().Ingresses(apiv1.NamespaceDefault).Get("foo_ingress_1", metav1.GetOptions{})
if err2 != nil {
t.Fatalf("unexpected error")
}
Expand All @@ -307,7 +307,7 @@ func TestStatusActions(t *testing.T) {
t.Fatalf("returned %v but expected %v", fooIngress2CurIPs, newIPs2)
}

oic, err := fk.Client.Extensions().Ingresses(api.NamespaceDefault).Get("foo_ingress_different_class", metav1.GetOptions{})
oic, err := fk.Client.ExtensionsV1beta1().Ingresses(api.NamespaceDefault).Get("foo_ingress_different_class", metav1.GetOptions{})
if err != nil {
t.Fatalf("unexpected error")
}
Expand Down

0 comments on commit b0eb1cd

Please sign in to comment.