dubeejw commented on a change in pull request #2591: User-Agent CLI/version
header
URL:
https://github.com/apache/incubator-openwhisk/pull/2591#discussion_r136174938
##########
File path: tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala
##########
@@ -314,6 +314,11 @@ class WskBasicUsageTests
}, waitBeforeRetry = Some(1.second), N = 5)
}
+ it should "include CLI user agent headers with outbound requests" in {
+ val stdout = wsk.cli(Seq("action", "list", "-v", "--auth",
wskprops.authKey) ++ wskprops.overrides).stdout
+ stdout should include regex ("""\bUser-Agent\b":
\[(\r\n|\r|\n)\s+"OpenWhisk\-CLI/201.*""".r)
Review comment:
Little simpler to just check for whitespace instead of the carriage returns
and new lines. Also seems like the test will fail in 2020.`"""\bUser-Agent\b":
\[\s+"OpenWhisk\-CLI/\d+.*""".r`
----------------------------------------------------------------
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