File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -861,6 +861,41 @@ test('Elastic cloud config', t => {
861
861
t . deepEqual ( pool . _ssl , { secureProtocol : 'TLSv1_2_method' } )
862
862
} )
863
863
864
+ t . test ( 'Without kibana component' , t => {
865
+ t . plan ( 5 )
866
+ const client = new Client ( {
867
+ cloud : {
868
+ // 'localhost$abcd$'
869
+ id : 'name:bG9jYWxob3N0JGFiY2Qk' ,
870
+ username : 'elastic' ,
871
+ password : 'changeme'
872
+ }
873
+ } )
874
+
875
+ const pool = client . connectionPool
876
+ t . ok ( pool instanceof CloudConnectionPool )
877
+ t . match ( pool . connections . find ( c => c . id === 'https://abcd.localhost/' ) , {
878
+ url :
new URL ( 'https://elastic:[email protected] ' ) ,
879
+ id : 'https://abcd.localhost/' ,
880
+ headers : {
881
+ authorization : 'Basic ' + Buffer . from ( 'elastic:changeme' ) . toString ( 'base64' )
882
+ } ,
883
+ ssl : { secureProtocol : 'TLSv1_2_method' } ,
884
+ deadCount : 0 ,
885
+ resurrectTimeout : 0 ,
886
+ roles : {
887
+ master : true ,
888
+ data : true ,
889
+ ingest : true ,
890
+ ml : false
891
+ }
892
+ } )
893
+
894
+ t . strictEqual ( client . transport . compression , 'gzip' )
895
+ t . strictEqual ( client . transport . suggestCompression , true )
896
+ t . deepEqual ( pool . _ssl , { secureProtocol : 'TLSv1_2_method' } )
897
+ } )
898
+
864
899
t . test ( 'Auth as separate option' , t => {
865
900
t . plan ( 5 )
866
901
const client = new Client ( {
You can’t perform that action at this time.
0 commit comments