From 0b2dfbcc91f960eb9cdaa99aa6fcc7ebfc03ab7a Mon Sep 17 00:00:00 2001 From: Ville Aikas Date: Wed, 8 Jul 2020 11:56:40 -0700 Subject: [PATCH] nil check on addressable --- test/lib/duck/resource_inspectors.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/lib/duck/resource_inspectors.go b/test/lib/duck/resource_inspectors.go index 6df11cd6d5d..af5f2209fb3 100644 --- a/test/lib/duck/resource_inspectors.go +++ b/test/lib/duck/resource_inspectors.go @@ -39,6 +39,10 @@ func GetAddressableURI(dynamicClient dynamic.Interface, obj *resources.MetaResou at := untyped.(*duckv1alpha1.AddressableType) + if at.Status.Address == nil { + return url.URL{}, fmt.Errorf("addressable does not have an Address: %+v", at) + } + au := at.Status.Address.GetURL() if au.Host == "" { return url.URL{}, fmt.Errorf("addressable's URL does not have a Host: %+v", at)