mdeuser commented on a change in pull request #2532: Update wsk test fwk to
allow tests to obfuscate sensitive output
URL:
https://github.com/apache/incubator-openwhisk/pull/2532#discussion_r129629542
##########
File path: tests/src/test/scala/common/Wsk.scala
##########
@@ -1040,13 +1040,14 @@ trait RunWskCmd extends Matchers {
env: Map[String, String] = Map("WSK_CONFIG_FILE" -> ""),
workingDir: File = new File("."),
stdinFile: Option[File] = None,
- showCmd: Boolean = false): RunResult = {
+ showCmd: Boolean = false,
+ hideFromOutput: Seq[String] = Seq()): RunResult = {
val args = baseCommand
if (verbose) args += "--verbose"
- if (showCmd) println(args.mkString(" ") + " " + params.mkString(" "))
+ if (showCmd) println(hideStr(args.mkString(" ") + " " +
params.mkString(" "), hideFromOutput))
Review comment:
Yep, in some places. IMHO, I kind of like seeing the actual commands used
within a test. When troubleshooting a failure, it's easy to see what's going
on from the logs.. and it's possible to copy/paste the command(s) from the log
to manually recreate each step in the test.
----------------------------------------------------------------
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