You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/08/07 17:51:15 UTC

[GitHub] dubeejw commented on a change in pull request #2424: Allow optional leading slash in CLI commands

dubeejw commented on a change in pull request #2424: Allow optional leading slash in CLI commands
URL: https://github.com/apache/incubator-openwhisk/pull/2424#discussion_r131717241
 
 

 ##########
 File path: tests/src/test/scala/system/basic/WskBasicTests.scala
 ##########
 @@ -75,6 +75,41 @@ class WskBasicTests
             stderr should include(errormsg)
     }
 
+    it should "accept a 3 part Fully Qualified Name without a leading '/'" in {
+        val auth: Seq[String] = Seq("--auth", wskprops.authKey)
+        val guestNamespace = wskprops.namespace
+        val packageName = "packageName3ptFQN"
+        val actionName = "actionName3ptFQN"
+        val triggerName = "triggerName3ptFQN"
+        val ruleName = "ruleName3ptFQN"
+        val fullQualifiedName = s"${guestNamespace}/${packageName}/${actionName}"
+        val validArgs: Seq[Seq[String]] = Seq(
+            Seq("package", "create", packageName),
+            Seq("action", "create", fullQualifiedName, defaultAction.get),
+            Seq("action", "update", fullQualifiedName, defaultAction.get),
+            Seq("action", "invoke", fullQualifiedName),
+            Seq("trigger", "create", triggerName),
+            Seq("action", "get", fullQualifiedName),
+            Seq("rule", "create", ruleName, triggerName, fullQualifiedName),
+            Seq("action", "delete", fullQualifiedName)
+        )
+        val cleanUp: Seq[Seq[String]] = Seq(
+            Seq("package", "delete", packageName),
+            Seq("trigger", "delete", triggerName),
+            Seq("rule", "delete", ruleName)
+        )
+        try {
+            validArgs foreach {
+                cmd => val stderr = wsk.cli(cmd ++ wskprops.overrides ++ auth, expectedExitCode = SUCCESS_EXIT).stderr
 
 Review comment:
   `SUCCESS_EXIT` is by default the exit code that is expected.
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services