rabbah 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_r132013941
########## File path: tests/src/test/scala/system/basic/WskBasicTests.scala ########## @@ -75,6 +75,34 @@ class WskBasicTests stderr should include(errormsg) } + it should "allow a 3 part Fully Qualified Name (FQN) without a leading '/'" in withAssetCleaner(wskprops) { + (wp, assetHelper) => + val guestNamespace = wsk.namespace.whois() + val packageName = "packageName3ptFQN" + val actionName = "actionName3ptFQN" + val triggerName = "triggerName3ptFQN" + val ruleName = "ruleName3ptFQN" + val fullQualifiedName = s"${guestNamespace}/${packageName}/${actionName}" + // Used for action and rule creation below + assetHelper.withCleaner(wsk.pkg, packageName) { + (pkg, _) => pkg.create(packageName) + } + assetHelper.withCleaner(wsk.trigger, triggerName) { + (trigger, _) => trigger.create(triggerName) + } + // Test action and rule creation where action name is 3 part FQN w/out leading slash + assetHelper.withCleaner(wsk.action, fullQualifiedName) { + (action, _) => action.create(fullQualifiedName, defaultAction) + } + assetHelper.withCleaner(wsk.rule, ruleName) { + (rule, _) => + rule.create(ruleName, trigger = triggerName, action = fullQualifiedName) + } + + wsk.action.invoke(fullQualifiedName).stdout should include(s"ok: invoked /$fullQualifiedName") + wsk.action.get(fullQualifiedName).stdout should include(s"ok: got action ${packageName}/${actionName}") Review comment: Sounds like different pr. ---------------------------------------------------------------- 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