-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(shared-utils): Fix addressing in getConfigValue (#16358)
* fix(shared-utils): Fix addressing in getConfigValue * Fix tests --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
0c4b341
commit ca1cc4e
Showing
3 changed files
with
32 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,30 +3,32 @@ import { ConfigService } from '@nestjs/config' | |
import * as utils from './shared.utils' | ||
|
||
const mockConfig = { | ||
clientLocationOrigin: 'http://localhost:4242', | ||
baseApiUrl: 'http://localhost:4444', | ||
attachmentBucket: 'attachmentBucket', | ||
templateApi: { | ||
clientLocationOrigin: 'http://localhost:4242/umsoknir', | ||
email: { | ||
sender: 'Devland.is', | ||
address: '[email protected]', | ||
}, | ||
jwtSecret: 'supersecret', | ||
xRoadBasePathWithEnv: '', | ||
SharedModuleConfig: { | ||
clientLocationOrigin: 'http://localhost:4242', | ||
baseApiUrl: 'http://localhost:4444', | ||
presignBucket: '', | ||
attachmentBucket: 'island-is-dev-storage-application-system', | ||
generalPetition: { | ||
endorsementApiBasePath: 'http://localhost:4246', | ||
}, | ||
userProfile: { | ||
serviceBasePath: 'http://localhost:3366', | ||
}, | ||
islykill: { | ||
cert: '', | ||
passphrase: '', | ||
basePath: '', | ||
attachmentBucket: 'attachmentBucket', | ||
templateApi: { | ||
clientLocationOrigin: 'http://localhost:4242/umsoknir', | ||
email: { | ||
sender: 'Devland.is', | ||
address: '[email protected]', | ||
}, | ||
jwtSecret: 'supersecret', | ||
xRoadBasePathWithEnv: '', | ||
baseApiUrl: 'http://localhost:4444', | ||
presignBucket: '', | ||
attachmentBucket: 'island-is-dev-storage-application-system', | ||
generalPetition: { | ||
endorsementApiBasePath: 'http://localhost:4246', | ||
}, | ||
userProfile: { | ||
serviceBasePath: 'http://localhost:3366', | ||
}, | ||
islykill: { | ||
cert: '', | ||
passphrase: '', | ||
basePath: '', | ||
}, | ||
}, | ||
}, | ||
} | ||
|
@@ -92,7 +94,7 @@ describe('shared utils', () => { | |
let configService: ConfigService<SharedModuleConfig> | ||
|
||
beforeEach(() => { | ||
configService = new ConfigService<SharedModuleConfig>(mockConfig) | ||
configService = new ConfigService(mockConfig) | ||
}) | ||
|
||
it('should get the client location origin from the config', () => { | ||
|
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