@@ -2,27 +2,26 @@ import { expect } from "chai"
22import { Client , connect } from "../../src"
33import { createClient } from "../support/fake_data"
44import { Rabbit } from "../support/rabbit"
5- import { eventually , username , password } from "../support/util"
6- import { getTestNodesFromEnv } from "../support/util"
5+ import { eventually , username , password , getTestNodesFromEnv } from "../support/util"
76import { Version } from "../../src/versions"
87import { randomUUID } from "node:crypto"
98import { readFile } from "node:fs/promises"
109
1110async function createTlsClient ( ) : Promise < Client > {
1211 const [ firstNode ] = getTestNodesFromEnv ( )
13- return connect (
14- {
15- hostname : firstNode . host ,
16- port : 5551 ,
17- mechanism : 'EXTERNAL' ,
18- ssl : {
19- ca : await readFile ( "./tls-gen/basic/result/ca_certificate .pem" ) ,
20- cert : await readFile ( "./tls-gen/basic/result/client_rabbitmq_certificate .pem" ) ,
21- key : await readFile ( "./tls-gen/basic/result/client_rabbitmq_key.pem" ) ,
22- } ,
23- vhost : "/ " ,
24- }
25- )
12+ return connect ( {
13+ hostname : firstNode . host ,
14+ port : 5551 ,
15+ mechanism : "EXTERNAL" ,
16+ ssl : {
17+ ca : await readFile ( "./tls-gen/basic/result/ca_certificate.pem" , "utf8" ) ,
18+ cert : await readFile ( "./tls-gen/basic/result/client_rabbitmq_certificate .pem" , "utf8 ") ,
19+ key : await readFile ( "./tls-gen/basic/result/client_rabbitmq_key .pem" , "utf8 ") ,
20+ } ,
21+ username : "" ,
22+ password : "" ,
23+ vhost : "/" ,
24+ } )
2625}
2726
2827describe ( "connect" , ( ) => {
0 commit comments