rabbah 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_r121462119
 
 

 ##########
 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:
   So the desired invariant is to ignore ~/.wskprops for tests - I don't claim 
the env var is the best solution but it is the defensive feature in place 
today. We could address it with an alternative explicit flag in the CLI.
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to