You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/03/03 03:56:03 UTC

[GitHub] chetanmeh commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore

chetanmeh commented on a change in pull request #3369: Use pureconfig for CouchDbRestStore
URL: https://github.com/apache/incubator-openwhisk/pull/3369#discussion_r172005583
 
 

 ##########
 File path: tests/src/test/scala/ha/ShootComponentsTests.scala
 ##########
 @@ -67,13 +70,13 @@ class ShootComponentsTests
   val controller0DockerHost = WhiskProperties.getBaseControllerHost()
   val couchDB0DockerHost = WhiskProperties.getBaseDBHost()
 
-  val dbProtocol = WhiskProperties.getProperty(WhiskConfig.dbProtocol)
+  val dbConfig = loadConfigOrThrow[CouchDbConfig](ConfigKeys.couchdb)
+  val dbProtocol = dbConfig.protocol
   val dbHostsList = WhiskProperties.getDBHosts
-  val dbPort = WhiskProperties.getProperty(WhiskConfig.dbPort)
-  val dbUsername = WhiskProperties.getProperty(WhiskConfig.dbUsername)
-  val dbPassword = WhiskProperties.getProperty(WhiskConfig.dbPassword)
-  val dbPrefix = WhiskProperties.getProperty(WhiskConfig.dbPrefix)
-  val dbWhiskAuth = WhiskProperties.getProperty(WhiskConfig.dbAuths)
+  val dbPort = dbConfig.port
+  val dbUsername = dbConfig.username
+  val dbPassword = dbConfig.password
+  val dbWhiskAuth = dbConfig.databases.get("WhiskAuth").get
 
 Review comment:
   Problem here is `WhiskAuth` is scoped to `core` package and test lives outside of that package. So need to use the string value explicitly

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services