@@ -87,26 +87,24 @@ func TestAPITLSPolicyFor(t *testing.T) {
8787
8888func TestCustomDomainsPickerOptions (t * testing.T ) {
8989 tests := []struct {
90- name string
91- customDomainsList * management.CustomDomainList
92- apiError error
93- assertOutput func (t testing.TB , options pickerOptions )
94- assertError func (t testing.TB , err error )
90+ name string
91+ customDomains [] * management.CustomDomain
92+ apiError error
93+ assertOutput func (t testing.TB , options pickerOptions )
94+ assertError func (t testing.TB , err error )
9595 }{
9696 {
9797 name : "happy path" ,
98- customDomainsList : & management.CustomDomainList {
99- CustomDomains : []* management.CustomDomain {
100- {
101- ID : auth0 .String ("some-id-1" ),
102- Domain : auth0 .String ("some-domain-1" ),
103- Status : auth0 .String ("ready" ),
104- },
105- {
106- ID : auth0 .String ("some-id-2" ),
107- Domain : auth0 .String ("some-domain-2" ),
108- Status : auth0 .String ("ready" ),
109- },
98+ customDomains : []* management.CustomDomain {
99+ {
100+ ID : auth0 .String ("some-id-1" ),
101+ Domain : auth0 .String ("some-domain-1" ),
102+ Status : auth0 .String ("ready" ),
103+ },
104+ {
105+ ID : auth0 .String ("some-id-2" ),
106+ Domain : auth0 .String ("some-domain-2" ),
107+ Status : auth0 .String ("ready" ),
110108 },
111109 },
112110 assertOutput : func (t testing.TB , options pickerOptions ) {
@@ -122,18 +120,16 @@ func TestCustomDomainsPickerOptions(t *testing.T) {
122120 },
123121 {
124122 name : "custom domains with a non-ready status" ,
125- customDomainsList : & management.CustomDomainList {
126- CustomDomains : []* management.CustomDomain {
127- {
128- ID : auth0 .String ("some-id-1" ),
129- Domain : auth0 .String ("some-domain-1" ),
130- Status : auth0 .String ("pending_verification" ),
131- },
132- {
133- ID : auth0 .String ("some-id-2" ),
134- Domain : auth0 .String ("some-domain-2" ),
135- Status : auth0 .String ("ready" ),
136- },
123+ customDomains : []* management.CustomDomain {
124+ {
125+ ID : auth0 .String ("some-id-1" ),
126+ Domain : auth0 .String ("some-domain-1" ),
127+ Status : auth0 .String ("pending_verification" ),
128+ },
129+ {
130+ ID : auth0 .String ("some-id-2" ),
131+ Domain : auth0 .String ("some-domain-2" ),
132+ Status : auth0 .String ("ready" ),
137133 },
138134 },
139135 assertOutput : func (t testing.TB , options pickerOptions ) {
@@ -148,10 +144,8 @@ func TestCustomDomainsPickerOptions(t *testing.T) {
148144 },
149145 },
150146 {
151- name : "no custom domains" ,
152- customDomainsList : & management.CustomDomainList {
153- CustomDomains : []* management.CustomDomain {},
154- },
147+ name : "no custom domains" ,
148+ customDomains : []* management.CustomDomain {},
155149 assertOutput : func (t testing.TB , options pickerOptions ) {
156150 t .Fail ()
157151 },
@@ -188,8 +182,8 @@ func TestCustomDomainsPickerOptions(t *testing.T) {
188182
189183 customDomainAPI := mock .NewMockCustomDomainAPI (ctrl )
190184 customDomainAPI .EXPECT ().
191- ListWithPagination ( gomock . Any (), gomock .Any ()).
192- Return (test .customDomainsList , test .apiError )
185+ List ( gomock .Any ()).
186+ Return (test .customDomains , test .apiError )
193187
194188 cli := & cli {
195189 api : & auth0.API {CustomDomain : customDomainAPI },
0 commit comments