File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ export async function prepareHandshakeDocument(
201201 const compressors = options . compressors ? options . compressors : [ ] ;
202202 const { serverApi } = authContext . connection ;
203203 const clientMetadata = await addContainerMetadata ( options . metadata ) ;
204+
204205 const handshakeDoc : HandshakeDocument = {
205206 [ serverApi ?. version || options . loadBalanced === true ? 'hello' : LEGACY_HELLO_COMMAND ] : 1 ,
206207 helloOk : true ,
Original file line number Diff line number Diff line change @@ -205,6 +205,23 @@ describe('Connect Tests', async function () {
205205 const handshakeDocument = await prepareHandshakeDocument ( authContext ) ;
206206 expect ( handshakeDocument . client . env . container . orchestrator ) . to . equal ( 'kubernetes' ) ;
207207 } ) ;
208+
209+ it ( `should not have 'name' property in client.env ` , async ( ) => {
210+ const handshakeDocument = await prepareHandshakeDocument ( authContext ) ;
211+ expect ( handshakeDocument . client . env ) . to . not . have . property ( 'name' ) ;
212+ } ) ;
213+ } ) ;
214+ } ) ;
215+
216+ context ( 'when container nor FAAS env is not present' , async ( ) => {
217+ const authContext = {
218+ connection : { } ,
219+ options : { ...CONNECT_DEFAULTS }
220+ } ;
221+
222+ it ( `should not have 'env' property in client` , async ( ) => {
223+ const handshakeDocument = await prepareHandshakeDocument ( authContext ) ;
224+ expect ( handshakeDocument . client ) . to . not . have . property ( 'env' ) ;
208225 } ) ;
209226 } ) ;
210227
You can’t perform that action at this time.
0 commit comments