@@ -101,7 +101,7 @@ func TestOIDCProviderConfig(t *testing.T) {
101
101
s := echoServer ([]byte (oidcConfigResponse ), t )
102
102
defer s .Close ()
103
103
104
- client := s .Client . pcc
104
+ client := s .Client
105
105
oidc , err := client .OIDCProviderConfig (context .Background (), "oidc.provider" )
106
106
if err != nil {
107
107
t .Fatal (err )
@@ -139,7 +139,7 @@ func TestOIDCProviderConfigError(t *testing.T) {
139
139
defer s .Close ()
140
140
s .Status = http .StatusNotFound
141
141
142
- client := s .Client . pcc
142
+ client := s .Client
143
143
saml , err := client .OIDCProviderConfig (context .Background (), "oidc.provider" )
144
144
if saml != nil || err == nil || ! IsConfigurationNotFound (err ) {
145
145
t .Errorf ("OIDCProviderConfig() = (%v, %v); want = (nil, ConfigurationNotFound)" , saml , err )
@@ -150,7 +150,7 @@ func TestCreateOIDCProviderConfig(t *testing.T) {
150
150
s := echoServer ([]byte (oidcConfigResponse ), t )
151
151
defer s .Close ()
152
152
153
- client := s .Client . pcc
153
+ client := s .Client
154
154
options := (& OIDCProviderConfigToCreate {}).
155
155
ID (oidcProviderConfig .ID ).
156
156
DisplayName (oidcProviderConfig .DisplayName ).
@@ -181,7 +181,7 @@ func TestCreateOIDCProviderConfigMinimal(t *testing.T) {
181
181
s := echoServer ([]byte (oidcConfigResponse ), t )
182
182
defer s .Close ()
183
183
184
- client := s .Client . pcc
184
+ client := s .Client
185
185
options := (& OIDCProviderConfigToCreate {}).
186
186
ID (oidcProviderConfig .ID ).
187
187
ClientID (oidcProviderConfig .ClientID ).
@@ -207,7 +207,7 @@ func TestCreateOIDCProviderConfigMinimal(t *testing.T) {
207
207
func TestCreateOIDCProviderConfigZeroValues (t * testing.T ) {
208
208
s := echoServer ([]byte (oidcConfigResponse ), t )
209
209
defer s .Close ()
210
- client := s .Client . pcc
210
+ client := s .Client
211
211
212
212
options := (& OIDCProviderConfigToCreate {}).
213
213
ID (oidcProviderConfig .ID ).
@@ -240,7 +240,8 @@ func TestCreateOIDCProviderConfigError(t *testing.T) {
240
240
s .Status = http .StatusInternalServerError
241
241
defer s .Close ()
242
242
243
- client := s .Client .pcc
243
+ client := s .Client
244
+ client .providerConfigClient .httpClient .RetryConfig = nil
244
245
options := (& OIDCProviderConfigToCreate {}).
245
246
ID (oidcProviderConfig .ID ).
246
247
ClientID (oidcProviderConfig .ClientID ).
@@ -316,7 +317,7 @@ func TestUpdateOIDCProviderConfig(t *testing.T) {
316
317
s := echoServer ([]byte (oidcConfigResponse ), t )
317
318
defer s .Close ()
318
319
319
- client := s .Client . pcc
320
+ client := s .Client
320
321
options := (& OIDCProviderConfigToUpdate {}).
321
322
DisplayName (oidcProviderConfig .DisplayName ).
322
323
Enabled (oidcProviderConfig .Enabled ).
@@ -352,7 +353,7 @@ func TestUpdateOIDCProviderConfigMinimal(t *testing.T) {
352
353
s := echoServer ([]byte (oidcConfigResponse ), t )
353
354
defer s .Close ()
354
355
355
- client := s .Client . pcc
356
+ client := s .Client
356
357
options := (& OIDCProviderConfigToUpdate {}).
357
358
DisplayName ("Other name" )
358
359
oidc , err := client .UpdateOIDCProviderConfig (context .Background (), "oidc.provider" , options )
@@ -379,7 +380,7 @@ func TestUpdateOIDCProviderConfigZeroValues(t *testing.T) {
379
380
s := echoServer ([]byte (oidcConfigResponse ), t )
380
381
defer s .Close ()
381
382
382
- client := s .Client . pcc
383
+ client := s .Client
383
384
options := (& OIDCProviderConfigToUpdate {}).
384
385
DisplayName ("" ).
385
386
Enabled (false )
@@ -468,7 +469,7 @@ func TestDeleteOIDCProviderConfig(t *testing.T) {
468
469
s := echoServer ([]byte ("{}" ), t )
469
470
defer s .Close ()
470
471
471
- client := s .Client . pcc
472
+ client := s .Client
472
473
if err := client .DeleteOIDCProviderConfig (context .Background (), "oidc.provider" ); err != nil {
473
474
t .Fatal (err )
474
475
}
@@ -501,7 +502,7 @@ func TestDeleteOIDCProviderConfigError(t *testing.T) {
501
502
defer s .Close ()
502
503
s .Status = http .StatusNotFound
503
504
504
- client := s .Client . pcc
505
+ client := s .Client
505
506
err := client .DeleteOIDCProviderConfig (context .Background (), "oidc.provider" )
506
507
if err == nil || ! IsConfigurationNotFound (err ) {
507
508
t .Errorf ("DeleteOIDCProviderConfig() = %v; want = ConfigurationNotFound" , err )
@@ -562,7 +563,7 @@ func TestOIDCProviderConfigs(t *testing.T) {
562
563
}
563
564
}
564
565
565
- client := s .Client . pcc
566
+ client := s .Client
566
567
testIterator (
567
568
client .OIDCProviderConfigs (context .Background (), "" ),
568
569
"" ,
@@ -578,7 +579,8 @@ func TestOIDCProviderConfigsError(t *testing.T) {
578
579
defer s .Close ()
579
580
s .Status = http .StatusInternalServerError
580
581
581
- client := s .Client .pcc
582
+ client := s .Client
583
+ client .providerConfigClient .httpClient .RetryConfig = nil
582
584
it := client .OIDCProviderConfigs (context .Background (), "" )
583
585
config , err := it .Next ()
584
586
if config != nil || err == nil || ! IsUnknown (err ) {
@@ -590,7 +592,7 @@ func TestSAMLProviderConfig(t *testing.T) {
590
592
s := echoServer ([]byte (samlConfigResponse ), t )
591
593
defer s .Close ()
592
594
593
- client := s .Client . pcc
595
+ client := s .Client
594
596
saml , err := client .SAMLProviderConfig (context .Background (), "saml.provider" )
595
597
if err != nil {
596
598
t .Fatal (err )
@@ -628,7 +630,7 @@ func TestSAMLProviderConfigError(t *testing.T) {
628
630
defer s .Close ()
629
631
s .Status = http .StatusNotFound
630
632
631
- client := s .Client . pcc
633
+ client := s .Client
632
634
saml , err := client .SAMLProviderConfig (context .Background (), "saml.provider" )
633
635
if saml != nil || err == nil || ! IsConfigurationNotFound (err ) {
634
636
t .Errorf ("SAMLProviderConfig() = (%v, %v); want = (nil, ConfigurationNotFound)" , saml , err )
@@ -639,7 +641,7 @@ func TestCreateSAMLProviderConfig(t *testing.T) {
639
641
s := echoServer ([]byte (samlConfigResponse ), t )
640
642
defer s .Close ()
641
643
642
- client := s .Client . pcc
644
+ client := s .Client
643
645
options := (& SAMLProviderConfigToCreate {}).
644
646
ID (samlProviderConfig .ID ).
645
647
DisplayName (samlProviderConfig .DisplayName ).
@@ -682,7 +684,7 @@ func TestCreateSAMLProviderConfigMinimal(t *testing.T) {
682
684
s := echoServer ([]byte (samlConfigResponse ), t )
683
685
defer s .Close ()
684
686
685
- client := s .Client . pcc
687
+ client := s .Client
686
688
options := (& SAMLProviderConfigToCreate {}).
687
689
ID (samlProviderConfig .ID ).
688
690
IDPEntityID (samlProviderConfig .IDPEntityID ).
@@ -718,7 +720,7 @@ func TestCreateSAMLProviderConfigMinimal(t *testing.T) {
718
720
func TestCreateSAMLProviderConfigZeroValues (t * testing.T ) {
719
721
s := echoServer ([]byte (samlConfigResponse ), t )
720
722
defer s .Close ()
721
- client := s .Client . pcc
723
+ client := s .Client
722
724
723
725
options := (& SAMLProviderConfigToCreate {}).
724
726
ID (samlProviderConfig .ID ).
@@ -763,7 +765,8 @@ func TestCreateSAMLProviderConfigError(t *testing.T) {
763
765
s .Status = http .StatusInternalServerError
764
766
defer s .Close ()
765
767
766
- client := s .Client .pcc
768
+ client := s .Client
769
+ client .providerConfigClient .httpClient .RetryConfig = nil
767
770
options := (& SAMLProviderConfigToCreate {}).
768
771
ID (samlProviderConfig .ID ).
769
772
IDPEntityID (samlProviderConfig .IDPEntityID ).
@@ -889,7 +892,7 @@ func TestUpdateSAMLProviderConfig(t *testing.T) {
889
892
s := echoServer ([]byte (samlConfigResponse ), t )
890
893
defer s .Close ()
891
894
892
- client := s .Client . pcc
895
+ client := s .Client
893
896
options := (& SAMLProviderConfigToUpdate {}).
894
897
DisplayName (samlProviderConfig .DisplayName ).
895
898
Enabled (samlProviderConfig .Enabled ).
@@ -941,7 +944,7 @@ func TestUpdateSAMLProviderConfigMinimal(t *testing.T) {
941
944
s := echoServer ([]byte (samlConfigResponse ), t )
942
945
defer s .Close ()
943
946
944
- client := s .Client . pcc
947
+ client := s .Client
945
948
options := (& SAMLProviderConfigToUpdate {}).
946
949
DisplayName ("Other name" )
947
950
saml , err := client .UpdateSAMLProviderConfig (context .Background (), "saml.provider" , options )
@@ -968,7 +971,7 @@ func TestUpdateSAMLProviderConfigZeroValues(t *testing.T) {
968
971
s := echoServer ([]byte (samlConfigResponse ), t )
969
972
defer s .Close ()
970
973
971
- client := s .Client . pcc
974
+ client := s .Client
972
975
options := (& SAMLProviderConfigToUpdate {}).
973
976
DisplayName ("" ).
974
977
Enabled (false ).
@@ -1094,7 +1097,7 @@ func TestDeleteSAMLProviderConfig(t *testing.T) {
1094
1097
s := echoServer ([]byte ("{}" ), t )
1095
1098
defer s .Close ()
1096
1099
1097
- client := s .Client . pcc
1100
+ client := s .Client
1098
1101
if err := client .DeleteSAMLProviderConfig (context .Background (), "saml.provider" ); err != nil {
1099
1102
t .Fatal (err )
1100
1103
}
@@ -1127,7 +1130,7 @@ func TestDeleteSAMLProviderConfigError(t *testing.T) {
1127
1130
defer s .Close ()
1128
1131
s .Status = http .StatusNotFound
1129
1132
1130
- client := s .Client . pcc
1133
+ client := s .Client
1131
1134
err := client .DeleteSAMLProviderConfig (context .Background (), "saml.provider" )
1132
1135
if err == nil || ! IsConfigurationNotFound (err ) {
1133
1136
t .Errorf ("DeleteSAMLProviderConfig() = %v; want = ConfigurationNotFound" , err )
@@ -1188,7 +1191,7 @@ func TestSAMLProviderConfigs(t *testing.T) {
1188
1191
}
1189
1192
}
1190
1193
1191
- client := s .Client . pcc
1194
+ client := s .Client
1192
1195
testIterator (
1193
1196
client .SAMLProviderConfigs (context .Background (), "" ),
1194
1197
"" ,
@@ -1204,7 +1207,8 @@ func TestSAMLProviderConfigsError(t *testing.T) {
1204
1207
defer s .Close ()
1205
1208
s .Status = http .StatusInternalServerError
1206
1209
1207
- client := s .Client .pcc
1210
+ client := s .Client
1211
+ client .providerConfigClient .httpClient .RetryConfig = nil
1208
1212
it := client .SAMLProviderConfigs (context .Background (), "" )
1209
1213
config , err := it .Next ()
1210
1214
if config != nil || err == nil || ! IsUnknown (err ) {
0 commit comments