rabbah commented on a change in pull request #2490: CLI summaries for actions 
without annotations
URL: 
https://github.com/apache/incubator-openwhisk/pull/2490#discussion_r131995766
 
 

 ##########
 File path: tests/src/test/scala/system/basic/WskBasicTests.scala
 ##########
 @@ -410,6 +487,97 @@ class WskBasicTests
             stdout should include regex (s"(?i)action /$ns/$name: Action 
description\\s*\\(parameters: paramName1, paramName2\\)")
     }
 
+    it should "create, and get an action summary without a description and/or 
defined parameters" in withAssetCleaner(wskprops) {
+        (wp, assetHelper) =>
+            val actNameNoParams = "actionNoParams"
+            val actNameNoDesc = "actionNoDesc"
+            val actNameNoDescOrParams = "actionNoDescOrParams"
+            val desc = "Action description"
+            val descFromParamsResp = "Returns a result based on parameters"
+            val annotsNoParams = Map(
+                "description" -> JsString(desc)
+            )
+            val annotsNoDesc = Map(
+                "parameters" -> JsArray(
+                    JsObject(
+                        "name" -> JsString("paramName1"),
+                        "description" -> JsString("Parameter description 1")),
+                    JsObject(
+                        "name" -> JsString("paramName2"),
+                        "description" -> JsString("Parameter description 2"))))
+
+            assetHelper.withCleaner(wsk.action, actNameNoDesc) {
+                (action, _) =>
+                    action.create(actNameNoDesc, defaultAction, annotations = 
annotsNoDesc)
+            }
+            assetHelper.withCleaner(wsk.action, actNameNoParams) {
+                (action, _) =>
+                    action.create(actNameNoParams, defaultAction, annotations 
= annotsNoParams)
+            }
+            assetHelper.withCleaner(wsk.action, actNameNoDescOrParams) {
+                (action, _) =>
+                    action.create(actNameNoDescOrParams, defaultAction)
+            }
+
+            val stdoutNoDesc = wsk.action.get(actNameNoDesc, summary = 
true).stdout
+            val stdoutNoParams = wsk.action.get(actNameNoParams, summary = 
true).stdout
+            val stdoutNoDescOrParams = wsk.action.get(actNameNoDescOrParams, 
summary = true).stdout
+            val ns_regex_list = wsk.namespace.list().stdout.trim.replace('\n', 
'|')
 
 Review comment:
   same as above.
   there's others, i trust you'll address all instances.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to