You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/06/12 16:08:18 UTC

[GitHub] mdeuser commented on a change in pull request #2357: Cli should ignore a config file env variable value of empty string

mdeuser commented on a change in pull request #2357: Cli should ignore a config file env variable value of empty string
URL: https://github.com/apache/incubator-openwhisk/pull/2357#discussion_r121456396
 
 

 ##########
 File path: tests/src/test/scala/common/Wsk.scala
 ##########
 @@ -869,7 +869,8 @@ class WskApi()
             { apiname map { a => Seq("--apiname", a) } getOrElse Seq() } ++
             { swagger map { s => Seq("--config-file", s) } getOrElse Seq() } ++
             { responsetype map { t => Seq("--response-type", t) } getOrElse Seq() }
-        cli(wp.overrides ++ params, expectedExitCode, showCmd = true, env=Map("WSK_CONFIG_FILE" -> cliCfgFile.getOrElse("")))
+        val envMap = { cliCfgFile map {f => Map("WSK_CONFIG_FILE" -> f) } getOrElse Map() }
 
 Review comment:
   hmm.. i would still like the ability to drive the tests via an externally set WSK_CONFIG_FILE variable (i.e. no change to the test code).  with the existing, pre-pr code, this is not possible; if the WSK_CONFIG_FILE is not set in the `env` parameter (of the `cli` method), the WSK_CONFIG_FILE is always set to "".
   
   i think another way to solve might be to change the `sys.env ++ env` to `env ++ sys.env` (wsk.scala line 1015).  this would leave the default `env` parameter WSK_CONFIG_FILE value set to "" and still have the environmental override.  what do you think?
 
----------------------------------------------------------------
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