@@ -157,6 +157,7 @@ describe('connection tracking', function () {
157
157
is_srv : false ,
158
158
topology_type : 'Unknown' ,
159
159
is_atlas : false ,
160
+ atlas_hostname : null ,
160
161
is_local_atlas : false ,
161
162
is_dataLake : false ,
162
163
is_enterprise : false ,
@@ -200,6 +201,7 @@ describe('connection tracking', function () {
200
201
is_srv : false ,
201
202
topology_type : 'Unknown' ,
202
203
is_atlas : false ,
204
+ atlas_hostname : null ,
203
205
is_local_atlas : false ,
204
206
is_dataLake : false ,
205
207
is_enterprise : false ,
@@ -226,12 +228,12 @@ describe('connection tracking', function () {
226
228
{
227
229
url : 'mongodb://compass-data-sets-shard-00-00.e06dc.mongodb.net' ,
228
230
is_srv : false ,
229
- title : 'is atlas, no srv' ,
231
+ title : 'no srv' ,
230
232
} ,
231
233
{
232
234
url : 'mongodb+srv://compass-data-sets.e06dc.mongodb.net' ,
233
235
is_srv : true ,
234
- title : 'is atlas, is srv' ,
236
+ title : 'is srv' ,
235
237
} ,
236
238
] ) {
237
239
it ( `tracks a new connection event - ${ title } ` , async function ( ) {
@@ -255,6 +257,7 @@ describe('connection tracking', function () {
255
257
is_srv : is_srv ,
256
258
topology_type : 'Unknown' ,
257
259
is_atlas : false ,
260
+ atlas_hostname : null ,
258
261
is_local_atlas : false ,
259
262
is_dataLake : false ,
260
263
is_enterprise : false ,
@@ -329,6 +332,7 @@ describe('connection tracking', function () {
329
332
is_srv : false ,
330
333
topology_type : 'Unknown' ,
331
334
is_atlas : false ,
335
+ atlas_hostname : null ,
332
336
is_local_atlas : true ,
333
337
is_dataLake : false ,
334
338
is_enterprise : false ,
@@ -373,6 +377,7 @@ describe('connection tracking', function () {
373
377
is_srv : false ,
374
378
topology_type : 'Unknown' ,
375
379
is_atlas : false ,
380
+ atlas_hostname : null ,
376
381
is_local_atlas : false ,
377
382
is_dataLake : false ,
378
383
is_enterprise : false ,
@@ -416,6 +421,7 @@ describe('connection tracking', function () {
416
421
is_srv : false ,
417
422
topology_type : 'Unknown' ,
418
423
is_atlas : false ,
424
+ atlas_hostname : null ,
419
425
is_local_atlas : false ,
420
426
is_dataLake : false ,
421
427
is_enterprise : false ,
@@ -458,6 +464,7 @@ describe('connection tracking', function () {
458
464
is_srv : false ,
459
465
topology_type : 'Unknown' ,
460
466
is_atlas : false ,
467
+ atlas_hostname : null ,
461
468
is_local_atlas : false ,
462
469
is_dataLake : false ,
463
470
is_enterprise : false ,
@@ -500,6 +507,7 @@ describe('connection tracking', function () {
500
507
is_srv : true ,
501
508
topology_type : 'Unknown' ,
502
509
is_atlas : false ,
510
+ atlas_hostname : null ,
503
511
is_local_atlas : false ,
504
512
is_dataLake : false ,
505
513
is_enterprise : false ,
@@ -632,13 +640,16 @@ describe('connection tracking', function () {
632
640
const connection : ConnectionInfo = {
633
641
...connectionInfo ,
634
642
connectionOptions : {
635
- connectionString : 'mongodb://127.0.0.1 ' ,
643
+ connectionString : 'mongodb://test-data-sets-a011bb.mongodb.net ' ,
636
644
} ,
637
645
} ;
638
646
trackNewConnectionEvent ( connection , mockDataService , logger , track ) ;
639
647
const [ { properties } ] = await trackEvent ;
640
648
641
649
expect ( properties . is_atlas ) . to . equal ( true ) ;
650
+ expect ( properties . atlas_hostname ) . to . equal (
651
+ 'test-data-sets-a011bb.mongodb.net'
652
+ ) ;
642
653
expect ( properties . is_local_atlas ) . to . equal ( false ) ;
643
654
expect ( properties . is_dataLake ) . to . equal ( true ) ;
644
655
expect ( properties . is_enterprise ) . to . equal ( true ) ;
@@ -690,6 +701,7 @@ describe('connection tracking', function () {
690
701
const [ { properties } ] = await trackEvent ;
691
702
692
703
expect ( properties . is_atlas ) . to . equal ( false ) ;
704
+ expect ( properties . atlas_hostname ) . to . equal ( null ) ;
693
705
expect ( properties . is_local_atlas ) . to . equal ( false ) ;
694
706
expect ( properties . is_dataLake ) . to . equal ( false ) ;
695
707
expect ( properties . is_enterprise ) . to . equal ( false ) ;
@@ -772,6 +784,7 @@ describe('connection tracking', function () {
772
784
is_srv : false ,
773
785
topology_type : 'Unknown' ,
774
786
is_atlas : false ,
787
+ atlas_hostname : null ,
775
788
is_local_atlas : false ,
776
789
is_dataLake : false ,
777
790
is_enterprise : false ,
0 commit comments