Skip to content

Commit

Permalink
fix: error on apac (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzraho authored Jun 20, 2024
1 parent fb4db65 commit 94e34ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const ENDPOINT_STAGE_INTERNAL = 'https://storage-state-<region>.stg.app-builder.

const ALLOWED_REGIONS = [ // first region is the default region
'amer',
'apac',
'emea'
// soon to come: 'apac'
]

// can be overwritten by env
Expand Down
6 changes: 3 additions & 3 deletions test/AdobeState.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ describe('private methods', () => {
})

test('no params, region set', async () => {
const region = 'apac'
const region = 'emea'
const env = PROD_ENV
mockCLIEnv.mockReturnValue(env)

Expand All @@ -564,7 +564,7 @@ describe('private methods', () => {
mockCLIEnv.mockReturnValue(env)

await expect(AdobeState.init({ ...fakeCredentials, region })).rejects
.toThrow('[AdobeStateLib:ERROR_BAD_ARGUMENT] /region must be equal to one of the allowed values: amer, apac, emea')
.toThrow('[AdobeStateLib:ERROR_BAD_ARGUMENT] /region must be equal to one of the allowed values: amer, emea')
})
})

Expand Down Expand Up @@ -608,7 +608,7 @@ describe('private methods', () => {
jest.resetModules()
process.env.AIO_STATE_ENDPOINT = 'https://custom.abc.com'
const env = STAGE_ENV
const region = 'apac'
const region = 'amer'
mockCLIEnv.mockReturnValue(env)

// need to instantiate a new store, when env changes
Expand Down

0 comments on commit 94e34ad

Please sign in to comment.