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(
201
201
const compressors = options . compressors ? options . compressors : [ ] ;
202
202
const { serverApi } = authContext . connection ;
203
203
const clientMetadata = await addContainerMetadata ( options . metadata ) ;
204
+
204
205
const handshakeDoc : HandshakeDocument = {
205
206
[ serverApi ?. version || options . loadBalanced === true ? 'hello' : LEGACY_HELLO_COMMAND ] : 1 ,
206
207
helloOk : true ,
Original file line number Diff line number Diff line change @@ -205,6 +205,23 @@ describe('Connect Tests', async function () {
205
205
const handshakeDocument = await prepareHandshakeDocument ( authContext ) ;
206
206
expect ( handshakeDocument . client . env . container . orchestrator ) . to . equal ( 'kubernetes' ) ;
207
207
} ) ;
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' ) ;
208
225
} ) ;
209
226
} ) ;
210
227
You can’t perform that action at this time.
0 commit comments