@@ -64,8 +64,8 @@ describe('Demo URL Processor', () => {
6464
6565 describe ( 'runDemoUrlProcessor' , ( ) => {
6666 it ( 'should process demo URL successfully' , async ( ) => {
67- // Set up the IMSORG_TO_TENANT secret in context
68- context . env . IMSORG_TO_TENANT = JSON . stringify ( {
67+ // Set up the IMS_ORG_TENANT_ID_MAPPINGS secret in context
68+ context . env . IMS_ORG_TENANT_ID_MAPPINGS = JSON . stringify ( {
6969 '8C6043F15F43B6390A49401A@AdobeOrg' : 'aem-sites-engineering' ,
7070 } ) ;
7171
@@ -81,8 +81,8 @@ describe('Demo URL Processor', () => {
8181 } ) ;
8282
8383 it ( 'should handle missing slackContext in taskContext' , async ( ) => {
84- // Set up the IMSORG_TO_TENANT secret in context
85- context . env . IMSORG_TO_TENANT = JSON . stringify ( {
84+ // Set up the IMS_ORG_TENANT_ID_MAPPINGS secret in context
85+ context . env . IMS_ORG_TENANT_ID_MAPPINGS = JSON . stringify ( {
8686 '8C6043F15F43B6390A49401A@AdobeOrg' : 'aem-sites-engineering' ,
8787 } ) ;
8888
@@ -92,9 +92,9 @@ describe('Demo URL Processor', () => {
9292 expect ( context . log . info . calledWith ( `Setup complete! Access your demo environment here: ${ expectedDemoUrl } ` ) ) . to . be . true ;
9393 } ) ;
9494
95- it ( 'should use IMSORG_TO_TENANT mapping when available' , async ( ) => {
96- // Set up the IMSORG_TO_TENANT secret in context
97- context . env . IMSORG_TO_TENANT = JSON . stringify ( {
95+ it ( 'should use IMS_ORG_TENANT_ID_MAPPINGS mapping when available' , async ( ) => {
96+ // Set up the IMS_ORG_TENANT_ID_MAPPINGS secret in context
97+ context . env . IMS_ORG_TENANT_ID_MAPPINGS = JSON . stringify ( {
9898 '8C6043F15F43B6390A49401A@AdobeOrg' : 'aem-sites-engineering' ,
9999 } ) ;
100100
@@ -105,9 +105,9 @@ describe('Demo URL Processor', () => {
105105 expect ( context . log . info . calledWith ( `Setup complete! Access your demo environment here: ${ expectedDemoUrl } ` ) ) . to . be . true ;
106106 } ) ;
107107
108- it ( 'should fallback to name-based tenant when IMSORG_TO_TENANT mapping is not available' , async ( ) => {
109- // Don't set IMSORG_TO_TENANT secret
110- delete context . env . IMSORG_TO_TENANT ;
108+ it ( 'should fallback to name-based tenant when IMS_ORG_TENANT_ID_MAPPINGS mapping is not available' , async ( ) => {
109+ // Don't set IMS_ORG_TENANT_ID_MAPPINGS secret
110+ delete context . env . IMS_ORG_TENANT_ID_MAPPINGS ;
111111
112112 await runDemoUrlProcessor ( message , context ) ;
113113
@@ -116,9 +116,9 @@ describe('Demo URL Processor', () => {
116116 expect ( context . log . info . calledWith ( `Setup complete! Access your demo environment here: ${ expectedDemoUrl } ` ) ) . to . be . true ;
117117 } ) ;
118118
119- it ( 'should fallback to name-based tenant when IMSORG_TO_TENANT mapping is invalid JSON' , async ( ) => {
120- // Set invalid JSON in IMSORG_TO_TENANT secret
121- context . env . IMSORG_TO_TENANT = 'invalid-json' ;
119+ it ( 'should fallback to name-based tenant when IMS_ORG_TENANT_ID_MAPPINGS mapping is invalid JSON' , async ( ) => {
120+ // Set invalid JSON in IMS_ORG_TENANT_ID_MAPPINGS secret
121+ context . env . IMS_ORG_TENANT_ID_MAPPINGS = 'invalid-json' ;
122122
123123 await runDemoUrlProcessor ( message , context ) ;
124124
@@ -127,9 +127,9 @@ describe('Demo URL Processor', () => {
127127 expect ( context . log . info . calledWith ( `Setup complete! Access your demo environment here: ${ expectedDemoUrl } ` ) ) . to . be . true ;
128128 } ) ;
129129
130- it ( 'should fallback to name-based tenant when IMSORG_TO_TENANT mapping does not contain the imsOrgId' , async ( ) => {
131- // Set IMSORG_TO_TENANT secret with different mapping
132- context . env . IMSORG_TO_TENANT = JSON . stringify ( {
130+ it ( 'should fallback to name-based tenant when IMS_ORG_TENANT_ID_MAPPINGS mapping does not contain the imsOrgId' , async ( ) => {
131+ // Set IMS_ORG_TENANT_ID_MAPPINGS secret with different mapping
132+ context . env . IMS_ORG_TENANT_ID_MAPPINGS = JSON . stringify ( {
133133 'DIFFERENT_ORG_ID@AdobeOrg' : 'different-team' ,
134134 } ) ;
135135
0 commit comments