@@ -243,7 +243,7 @@ describe('KubeConfig', () => {
243
243
kc . loadFromFile ( kcFileName ) ;
244
244
245
245
const opts : https . RequestOptions = { } ;
246
- kc . applytoHTTPSOptions ( opts ) ;
246
+ kc . applyToHTTPSOptions ( opts ) ;
247
247
248
248
expect ( opts ) . to . deep . equal ( {
249
249
headers : { } ,
@@ -264,7 +264,7 @@ describe('KubeConfig', () => {
264
264
} ;
265
265
const rc = new RequestContext ( testServerName1 , HttpMethod . GET ) ;
266
266
await kc . applySecurityAuthentication ( rc ) ;
267
- await kc . applytoHTTPSOptions ( opts ) ;
267
+ await kc . applyToHTTPSOptions ( opts ) ;
268
268
const expectedCA = Buffer . from ( 'CADATA2' , 'utf-8' ) ;
269
269
const expectedAgent = new https . Agent ( {
270
270
ca : expectedCA ,
@@ -669,7 +669,7 @@ describe('KubeConfig', () => {
669
669
670
670
config . loadFromClusterAndUser ( { } as Cluster , { username : user , password : passwd } as User ) ;
671
671
const opts = { } as https . RequestOptions ;
672
- await config . applytoHTTPSOptions ( opts ) ;
672
+ await config . applyToHTTPSOptions ( opts ) ;
673
673
674
674
expect ( opts . auth ) . to . equal ( `${ user } :${ passwd } ` ) ;
675
675
} ) ;
@@ -689,7 +689,7 @@ describe('KubeConfig', () => {
689
689
) ;
690
690
const opts = { } as RequestOptions ;
691
691
692
- await config . applytoHTTPSOptions ( opts ) ;
692
+ await config . applyToHTTPSOptions ( opts ) ;
693
693
694
694
/* tslint:disable no-unused-expression*/
695
695
expect ( opts . auth ) . to . not . be . undefined ;
@@ -704,7 +704,7 @@ describe('KubeConfig', () => {
704
704
config . loadFromClusterAndUser ( { skipTLSVerify : false } as Cluster , { } as User ) ;
705
705
const opts = { } as RequestOptions ;
706
706
707
- await config . applytoHTTPSOptions ( opts ) ;
707
+ await config . applyToHTTPSOptions ( opts ) ;
708
708
709
709
expect ( opts . rejectUnauthorized ) . to . equal ( undefined ) ;
710
710
} ) ;
@@ -719,7 +719,7 @@ describe('KubeConfig', () => {
719
719
) ;
720
720
const opts = { } as RequestOptions ;
721
721
722
- await config . applytoHTTPSOptions ( opts ) ;
722
+ await config . applyToHTTPSOptions ( opts ) ;
723
723
expect ( opts . headers ) . to . not . be . undefined ;
724
724
if ( opts . headers ) {
725
725
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -742,14 +742,14 @@ describe('KubeConfig', () => {
742
742
) ;
743
743
const opts = { } as RequestOptions ;
744
744
745
- await config . applytoHTTPSOptions ( opts ) ;
745
+ await config . applyToHTTPSOptions ( opts ) ;
746
746
expect ( opts . headers ) . to . not . be . undefined ;
747
747
if ( opts . headers ) {
748
748
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
749
749
}
750
750
opts . headers = { } ;
751
751
opts . headers . Host = 'foo.com' ;
752
- await config . applytoHTTPSOptions ( opts ) ;
752
+ await config . applyToHTTPSOptions ( opts ) ;
753
753
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
754
754
} ) ;
755
755
@@ -769,7 +769,7 @@ describe('KubeConfig', () => {
769
769
) ;
770
770
const opts = { } as RequestOptions ;
771
771
772
- await config . applytoHTTPSOptions ( opts ) ;
772
+ await config . applyToHTTPSOptions ( opts ) ;
773
773
expect ( opts . headers ) . to . not . be . undefined ;
774
774
if ( opts . headers ) {
775
775
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -792,7 +792,7 @@ describe('KubeConfig', () => {
792
792
) ;
793
793
const opts = { } as RequestOptions ;
794
794
795
- await config . applytoHTTPSOptions ( opts ) ;
795
+ await config . applyToHTTPSOptions ( opts ) ;
796
796
expect ( opts . rejectUnauthorized ) . to . equal ( false ) ;
797
797
} ) ;
798
798
@@ -814,7 +814,7 @@ describe('KubeConfig', () => {
814
814
) ;
815
815
const opts = { } as RequestOptions ;
816
816
817
- await config . applytoHTTPSOptions ( opts ) ;
817
+ await config . applyToHTTPSOptions ( opts ) ;
818
818
expect ( opts . rejectUnauthorized ) . to . equal ( undefined ) ;
819
819
} ) ;
820
820
@@ -833,7 +833,7 @@ describe('KubeConfig', () => {
833
833
) ;
834
834
const opts = { } as RequestOptions ;
835
835
836
- return expect ( config . applytoHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
836
+ return expect ( config . applyToHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
837
837
'Token is expired!' ,
838
838
) ;
839
839
} ) ;
@@ -854,7 +854,7 @@ describe('KubeConfig', () => {
854
854
} as User ,
855
855
) ;
856
856
const opts = { } as RequestOptions ;
857
- return expect ( config . applytoHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
857
+ return expect ( config . applyToHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
858
858
/ F a i l e d t o r e f r e s h t o k e n / ,
859
859
) ;
860
860
} ) ;
@@ -883,7 +883,7 @@ describe('KubeConfig', () => {
883
883
} as User ,
884
884
) ;
885
885
const opts = { } as RequestOptions ;
886
- await config . applytoHTTPSOptions ( opts ) ;
886
+ await config . applyToHTTPSOptions ( opts ) ;
887
887
expect ( opts . headers ) . to . not . be . undefined ;
888
888
if ( opts . headers ) {
889
889
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -914,7 +914,7 @@ describe('KubeConfig', () => {
914
914
} as User ,
915
915
) ;
916
916
const opts = { } as RequestOptions ;
917
- await config . applytoHTTPSOptions ( opts ) ;
917
+ await config . applyToHTTPSOptions ( opts ) ;
918
918
expect ( opts . headers ) . to . not . be . undefined ;
919
919
if ( opts . headers ) {
920
920
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -944,7 +944,7 @@ describe('KubeConfig', () => {
944
944
} as User ,
945
945
) ;
946
946
const opts = { } as RequestOptions ;
947
- await config . applytoHTTPSOptions ( opts ) ;
947
+ await config . applyToHTTPSOptions ( opts ) ;
948
948
expect ( opts . headers ) . to . not . be . undefined ;
949
949
if ( opts . headers ) {
950
950
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -973,7 +973,7 @@ describe('KubeConfig', () => {
973
973
} as User ,
974
974
) ;
975
975
const opts = { } as RequestOptions ;
976
- await config . applytoHTTPSOptions ( opts ) ;
976
+ await config . applyToHTTPSOptions ( opts ) ;
977
977
expect ( opts . headers ) . to . not . be . undefined ;
978
978
if ( opts . headers ) {
979
979
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -1002,7 +1002,7 @@ describe('KubeConfig', () => {
1002
1002
} as User ,
1003
1003
) ;
1004
1004
const opts = { } as RequestOptions ;
1005
- await config . applytoHTTPSOptions ( opts ) ;
1005
+ await config . applyToHTTPSOptions ( opts ) ;
1006
1006
expect ( opts . headers ) . to . not . be . undefined ;
1007
1007
if ( opts . headers ) {
1008
1008
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -1038,7 +1038,7 @@ describe('KubeConfig', () => {
1038
1038
) ;
1039
1039
// TODO: inject the exec command here and validate env vars?
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?
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 } ` ) ;
@@ -1105,7 +1105,7 @@ describe('KubeConfig', () => {
1105
1105
) ;
1106
1106
// TODO: inject the exec command here?
1107
1107
const opts = { } as RequestOptions ;
1108
- await config . applytoHTTPSOptions ( opts ) ;
1108
+ await config . applyToHTTPSOptions ( opts ) ;
1109
1109
expect ( opts . headers ) . to . not . be . undefined ;
1110
1110
if ( opts . headers ) {
1111
1111
expect ( opts . headers . Authorization ) . to . equal ( `Bearer ${ token } ` ) ;
@@ -1137,7 +1137,7 @@ describe('KubeConfig', () => {
1137
1137
) ;
1138
1138
// TODO: inject the exec command here?
1139
1139
const opts = { } as RequestOptions ;
1140
- await config . applytoHTTPSOptions ( opts ) ;
1140
+ await config . applyToHTTPSOptions ( opts ) ;
1141
1141
let execAuthenticator = ( KubeConfig as any ) . authenticators . find (
1142
1142
( authenticator ) => authenticator instanceof ExecAuth ,
1143
1143
) ;
@@ -1158,7 +1158,7 @@ describe('KubeConfig', () => {
1158
1158
} as User ,
1159
1159
) ;
1160
1160
const opts = { } as RequestOptions ;
1161
- return expect ( config . applytoHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
1161
+ return expect ( config . applyToHTTPSOptions ( opts ) ) . to . eventually . be . rejectedWith (
1162
1162
'No command was specified for exec authProvider!' ,
1163
1163
) ;
1164
1164
} ) ;
@@ -1457,7 +1457,7 @@ describe('KubeConfig', () => {
1457
1457
1458
1458
it ( 'should apply to request' , async ( ) => {
1459
1459
const opts = { } as RequestOptions ;
1460
- await emptyConfig . applytoHTTPSOptions ( opts ) ;
1460
+ await emptyConfig . applyToHTTPSOptions ( opts ) ;
1461
1461
} ) ;
1462
1462
} ) ;
1463
1463
0 commit comments