File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,9 @@ module.exports = _.defaultsDeep({
193193 dialect : 'sqlite' ,
194194 storage : './test/test.sqlite' ,
195195 database : 'test'
196+ } ,
197+ uristore : {
198+ uri : 'sqlite://testuser:password@testhost:1234/testdb'
196199 }
197200 } ,
198201 models : {
Original file line number Diff line number Diff line change @@ -32,6 +32,18 @@ describe('lib.Transformer', () => {
3232 assert ( connections . teststore )
3333 assert . equal ( connections . storeoverride . options . dialect , 'sqlite' )
3434 } )
35+ it ( 'should transform uri properly' , ( ) => {
36+ const connections = lib . Transformer . transformStores ( global . app )
37+ assert ( connections . uristore )
38+ assert . equal ( connections . uristore . options . dialect , 'sqlite' )
39+ assert . equal ( connections . uristore . options . host , 'testhost' )
40+ assert . equal ( connections . uristore . config . host , 'testhost' )
41+ assert . equal ( connections . uristore . config . database , 'testdb' )
42+ // test config for other dialects
43+ assert . equal ( connections . uristore . config . port , 1234 )
44+ assert . equal ( connections . uristore . config . username , 'testuser' )
45+ assert . equal ( connections . uristore . config . password , 'password' )
46+ } )
3547 } )
3648
3749} )
You can’t perform that action at this time.
0 commit comments