@@ -279,7 +279,7 @@ describe('KubeConfig', () => {
279
279
kc . loadFromFile ( kcFileName ) ;
280
280
281
281
const opts : https . RequestOptions = { } ;
282
- kc . applytoHTTPSOptions ( opts ) ;
282
+ kc . applyToHTTPSOptions ( opts ) ;
283
283
284
284
expect ( opts ) . to . deep . equal ( {
285
285
headers : { } ,
@@ -300,7 +300,7 @@ describe('KubeConfig', () => {
300
300
} ;
301
301
const rc = new RequestContext ( testServerName1 , HttpMethod . GET ) ;
302
302
await kc . applySecurityAuthentication ( rc ) ;
303
- await kc . applytoHTTPSOptions ( opts ) ;
303
+ await kc . applyToHTTPSOptions ( opts ) ;
304
304
const expectedCA = Buffer . from ( 'CADATA2' , 'utf-8' ) ;
305
305
const expectedAgent = new https . Agent ( {
306
306
ca : expectedCA ,
@@ -705,7 +705,7 @@ describe('KubeConfig', () => {
705
705
706
706
config . loadFromClusterAndUser ( { } as Cluster , { username : user , password : passwd } as User ) ;
707
707
const opts = { } as https . RequestOptions ;
708
- await config . applytoHTTPSOptions ( opts ) ;
708
+ await config . applyToHTTPSOptions ( opts ) ;
709
709
710
710
expect ( opts . auth ) . to . equal ( `${ user } :${ passwd } ` ) ;
711
711
} ) ;
@@ -725,7 +725,7 @@ describe('KubeConfig', () => {
725
725
) ;
726
726
const opts = { } as RequestOptions ;
727
727
728
- await config . applytoHTTPSOptions ( opts ) ;
728
+ await config . applyToHTTPSOptions ( opts ) ;
729
729
730
730
/* tslint:disable no-unused-expression*/
731
731
expect ( opts . auth ) . to . not . be . undefined ;
@@ -740,7 +740,7 @@ describe('KubeConfig', () => {
740
740
config . loadFromClusterAndUser ( { skipTLSVerify : false } as Cluster , { } as User ) ;
741
741
const opts = { } as RequestOptions ;
742
742
743
- await config . applytoHTTPSOptions ( opts ) ;
743
+ await config . applyToHTTPSOptions ( opts ) ;
744
744
745
745
expect ( opts . rejectUnauthorized ) . to . equal ( undefined ) ;
746
746
} ) ;
@@ -755,7 +755,7 @@ describe('KubeConfig', () => {
755
755
) ;
756
756
const opts = { } as RequestOptions ;
757
757
758
- await config . applytoHTTPSOptions ( opts ) ;
758
+ await config . applyToHTTPSOptions ( opts ) ;
759
759
expect ( opts . headers ) . to . not . be . undefined ;
760
760
if ( opts . headers ) {
761
761
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -778,14 +778,14 @@ describe('KubeConfig', () => {
778
778
) ;
779
779
const opts = { } as RequestOptions ;
780
780
781
- await config . applytoHTTPSOptions ( opts ) ;
781
+ await config . applyToHTTPSOptions ( opts ) ;
782
782
expect ( opts . headers ) . to . not . be . undefined ;
783
783
if ( opts . headers ) {
784
784
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
785
785
}
786
786
opts . headers = { } ;
787
787
opts . headers . Host = 'foo.com' ;
788
- await config . applytoHTTPSOptions ( opts ) ;
788
+ await config . applyToHTTPSOptions ( opts ) ;
789
789
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
790
790
} ) ;
791
791
@@ -805,7 +805,7 @@ describe('KubeConfig', () => {
805
805
) ;
806
806
const opts = { } as RequestOptions ;
807
807
808
- await config . applytoHTTPSOptions ( opts ) ;
808
+ await config . applyToHTTPSOptions ( opts ) ;
809
809
expect ( opts . headers ) . to . not . be . undefined ;
810
810
if ( opts . headers ) {
811
811
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -828,7 +828,7 @@ describe('KubeConfig', () => {
828
828
) ;
829
829
const opts = { } as RequestOptions ;
830
830
831
- await config . applytoHTTPSOptions ( opts ) ;
831
+ await config . applyToHTTPSOptions ( opts ) ;
832
832
expect ( opts . rejectUnauthorized ) . to . equal ( false ) ;
833
833
} ) ;
834
834
@@ -850,7 +850,7 @@ describe('KubeConfig', () => {
850
850
) ;
851
851
const opts = { } as RequestOptions ;
852
852
853
- await config . applytoHTTPSOptions ( opts ) ;
853
+ await config . applyToHTTPSOptions ( opts ) ;
854
854
expect ( opts . rejectUnauthorized ) . to . equal ( undefined ) ;
855
855
} ) ;
856
856
@@ -869,7 +869,7 @@ describe('KubeConfig', () => {
869
869
) ;
870
870
const opts = { } as RequestOptions ;
871
871
872
- return expect ( config . applytoHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
872
+ return expect ( config . applyToHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
873
873
'Token is expired!' ,
874
874
) ;
875
875
} ) ;
@@ -890,7 +890,7 @@ describe('KubeConfig', () => {
890
890
} as User ,
891
891
) ;
892
892
const opts = { } as RequestOptions ;
893
- return expect ( config . applytoHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
893
+ return expect ( config . applyToHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
894
894
/ F a i l e d t o r e f r e s h t o k e n / ,
895
895
) ;
896
896
} ) ;
@@ -919,7 +919,7 @@ describe('KubeConfig', () => {
919
919
} as User ,
920
920
) ;
921
921
const opts = { } as RequestOptions ;
922
- await config . applytoHTTPSOptions ( opts ) ;
922
+ await config . applyToHTTPSOptions ( opts ) ;
923
923
expect ( opts . headers ) . to . not . be . undefined ;
924
924
if ( opts . headers ) {
925
925
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -950,7 +950,7 @@ describe('KubeConfig', () => {
950
950
} as User ,
951
951
) ;
952
952
const opts = { } as RequestOptions ;
953
- await config . applytoHTTPSOptions ( opts ) ;
953
+ await config . applyToHTTPSOptions ( opts ) ;
954
954
expect ( opts . headers ) . to . not . be . undefined ;
955
955
if ( opts . headers ) {
956
956
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -980,7 +980,7 @@ describe('KubeConfig', () => {
980
980
} as User ,
981
981
) ;
982
982
const opts = { } as RequestOptions ;
983
- await config . applytoHTTPSOptions ( opts ) ;
983
+ await config . applyToHTTPSOptions ( opts ) ;
984
984
expect ( opts . headers ) . to . not . be . undefined ;
985
985
if ( opts . headers ) {
986
986
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -1009,7 +1009,7 @@ describe('KubeConfig', () => {
1009
1009
} as User ,
1010
1010
) ;
1011
1011
const opts = { } as RequestOptions ;
1012
- await config . applytoHTTPSOptions ( opts ) ;
1012
+ await config . applyToHTTPSOptions ( opts ) ;
1013
1013
expect ( opts . headers ) . to . not . be . undefined ;
1014
1014
if ( opts . headers ) {
1015
1015
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -1038,7 +1038,7 @@ describe('KubeConfig', () => {
1038
1038
} as User ,
1039
1039
) ;
1040
1040
const opts = { } as RequestOptions ;
1041
- await config . applytoHTTPSOptions ( opts ) ;
1041
+ await config . applyToHTTPSOptions ( opts ) ;
1042
1042
expect ( opts . headers ) . to . not . be . undefined ;
1043
1043
if ( opts . headers ) {
1044
1044
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -1074,7 +1074,7 @@ describe('KubeConfig', () => {
1074
1074
) ;
1075
1075
// TODO: inject the exec command here and validate env vars?
1076
1076
const opts = { } as RequestOptions ;
1077
- await config . applytoHTTPSOptions ( opts ) ;
1077
+ await config . applyToHTTPSOptions ( opts ) ;
1078
1078
expect ( opts . headers ) . to . not . be . undefined ;
1079
1079
if ( opts . headers ) {
1080
1080
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -1110,7 +1110,7 @@ describe('KubeConfig', () => {
1110
1110
) ;
1111
1111
// TODO: inject the exec command here?
1112
1112
const opts = { } as RequestOptions ;
1113
- await config . applytoHTTPSOptions ( opts ) ;
1113
+ await config . applyToHTTPSOptions ( opts ) ;
1114
1114
expect ( opts . headers ) . to . not . be . undefined ;
1115
1115
if ( opts . headers ) {
1116
1116
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -1141,7 +1141,7 @@ describe('KubeConfig', () => {
1141
1141
) ;
1142
1142
// TODO: inject the exec command here?
1143
1143
const opts = { } as RequestOptions ;
1144
- await config . applytoHTTPSOptions ( opts ) ;
1144
+ await config . applyToHTTPSOptions ( opts ) ;
1145
1145
expect ( opts . headers ) . to . not . be . undefined ;
1146
1146
if ( opts . headers ) {
1147
1147
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -1173,7 +1173,7 @@ describe('KubeConfig', () => {
1173
1173
) ;
1174
1174
// TODO: inject the exec command here?
1175
1175
const opts = { } as RequestOptions ;
1176
- await config . applytoHTTPSOptions ( opts ) ;
1176
+ await config . applyToHTTPSOptions ( opts ) ;
1177
1177
const execAuthenticator = ( KubeConfig as any ) . authenticators . find (
1178
1178
( authenticator ) => authenticator instanceof ExecAuth ,
1179
1179
) ;
@@ -1194,7 +1194,7 @@ describe('KubeConfig', () => {
1194
1194
} as User ,
1195
1195
) ;
1196
1196
const opts = { } as RequestOptions ;
1197
- return expect ( config . applytoHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
1197
+ return expect ( config . applyToHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
1198
1198
'No command was specified for exec authProvider!' ,
1199
1199
) ;
1200
1200
} ) ;
@@ -1493,7 +1493,7 @@ describe('KubeConfig', () => {
1493
1493
1494
1494
it ( 'should apply to request' , async ( ) => {
1495
1495
const opts = { } as RequestOptions ;
1496
- await emptyConfig . applytoHTTPSOptions ( opts ) ;
1496
+ await emptyConfig . applyToHTTPSOptions ( opts ) ;
1497
1497
} ) ;
1498
1498
} ) ;
1499
1499
0 commit comments