scala - How would I configure FlyWay in IntegrationTest scope -


i'm attempting configure flyway differently when it's within integrationtest configuration scope inside subproject in sbt:

// build.sbt  lazy val api = project.project.in(file("api")).   // ...   settings(flywaysettings: _*).   settings(     // ...     flywayurl in integrationtest := "jdbc:postgresql://localhost:5432/mydb_test"     flywayuser in integrationtest := "user"     flywaypassword in integrationtest := "pw"  ) 

but when run sbt still looking values in default scope:

$ sbt  > api/it:flywayurl [info] jdbc:postgresql://localhost:5432/mydb_test  > api/it:flywayuser [info] user  > api/it:flywaypassword [info] pw  > api/it:flywaymigrate // ... [info] flyway 3.2.1 boxfuse [trace] stack trace suppressed: run last api/*:flywaymigrate full output. [error] (api/*:flywaymigrate) org.flywaydb.core.api.flywayexception: unable connect database. configure url, user , password! [error] total time: 3 s, completed 27-jan-2016 1:33:08 pm 

not sure did wrong....

looks need use inconfig:

// build.sbt lazy val api = project.project.in(file("api")).  // copy settings integrationtest configuration settings(inconfig(integrationtest)(flywaysettings): _*). settings(   // ...   flywayurl in integrationtest := "jdbc:postgresql://localhost:5432/mydb_test"   flywayuser in integrationtest := "user"   flywaypassword in integrationtest := "pw" ), 

now command api/it:flywaymigrate values correct scope.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -