dubeejw commented on a change in pull request #2591: User-Agent CLI/version 
header
URL: 
https://github.com/apache/incubator-openwhisk/pull/2591#discussion_r136175201
 
 

 ##########
 File path: tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala
 ##########
 @@ -119,6 +119,10 @@ class WskBasicUsageTests
             wsk.action.get(fullQualifiedName).stdout should include(s"ok: got 
action ${packageName}/${actionName}")
     }
 
+    it should "include CLI user agent headers with outbound requests" in {
+        wsk.action.list(verboseFlag = Some(true)).stdout should include regex 
("""(?i)User-Agent": \[(\r\n|\r|\n)\s+"OpenWhisk\-CLI/201.*""")
 
 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

Reply via email to