@@ -530,6 +530,7 @@ describe("AlDefaultClient", () => {
530530 } ) ;
531531 describe ( 'for a YARD API Endpoint' , ( ) => {
532532 it ( 'should properly resolve the full URL' , async ( ) => {
533+ AlLocatorService . setContext ( { environment :'production' , residency : 'EMEA' , insightLocationId : 'defender-uk-newport' } ) ;
533534 const config : APIRequestParams = {
534535 service_stack : AlLocation . YARDAPI ,
535536 version : 1 ,
@@ -541,6 +542,19 @@ describe("AlDefaultClient", () => {
541542 let fullURL = await AlDefaultClient . fromConfigToFullUrl ( config ) ;
542543 expect ( fullURL ) . to . equal ( "https://yard.alertlogic.co.uk/v1/12345678/something/wicked?this-way=comes" ) ;
543544 } ) ;
545+ it ( 'should properly resolve the full URL in a different datacenter' , async ( ) => {
546+ AlLocatorService . setContext ( { environment :'production' , residency : 'US' , insightLocationId : 'defender-us-denver' } ) ;
547+ const config : APIRequestParams = {
548+ service_stack : AlLocation . YARDAPI ,
549+ version : 1 ,
550+ account_id : "12345678" ,
551+ path : '/something/wicked' ,
552+ params : { 'this-way' : 'comes' } ,
553+ method : 'GET' ,
554+ } ;
555+ let fullURL = await AlDefaultClient . fromConfigToFullUrl ( config ) ;
556+ expect ( fullURL ) . to . equal ( "https://yard.alertlogic.com/v1/12345678/something/wicked?this-way=comes" ) ;
557+ } ) ;
544558 } ) ;
545559 } ) ;
546560 describe ( 'when flushCacheKeys is present' , ( ) => {
0 commit comments