-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added support to eu/us2 datacenter for gainsight px destination (…
…#3871) * feat: added support to eu/us2 datacenter for gainsight px destination * fix: added unit test
- Loading branch information
1 parent
c51cfbb
commit 12ac3de
Showing
4 changed files
with
65 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const { BASE_ENDPOINT, BASE_EU_ENDPOINT, BASE_US2_ENDPOINT, getBaseEndpoint } = require('./config'); | ||
|
||
describe('getBaseEndpoint method test', () => { | ||
it('Should return BASE_ENDPOINT when destination.Config.dataCenter is not "EU" or "US2"', () => { | ||
const Config = { | ||
dataCenter: 'US', | ||
}; | ||
const result = getBaseEndpoint(Config); | ||
expect(result).toBe(BASE_ENDPOINT); | ||
}); | ||
|
||
it('Should return BASE_EU_ENDPOINT when destination.Config.dataCenter is "EU"', () => { | ||
const Config = { | ||
dataCenter: 'EU', | ||
}; | ||
const result = getBaseEndpoint(Config); | ||
expect(result).toBe(BASE_EU_ENDPOINT); | ||
}); | ||
|
||
it('Should return BASE_US2_ENDPOINT when destination.Config.dataCenter is "US2"', () => { | ||
const Config = { | ||
dataCenter: 'US2', | ||
}; | ||
const result = getBaseEndpoint(Config); | ||
expect(result).toBe(BASE_US2_ENDPOINT); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters