Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 61156200D3A for ; Wed, 15 Nov 2017 18:34:15 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5F963160BF6; Wed, 15 Nov 2017 17:34:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 91DD6160C0B for ; Wed, 15 Nov 2017 18:34:14 +0100 (CET) Received: (qmail 71454 invoked by uid 500); 15 Nov 2017 17:34:13 -0000 Mailing-List: contact commits-help@openwhisk.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.apache.org Delivered-To: mailing list commits@openwhisk.apache.org Received: (qmail 71282 invoked by uid 99); 15 Nov 2017 17:34:13 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Nov 2017 17:34:13 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 3595A81BE6; Wed, 15 Nov 2017 17:34:12 +0000 (UTC) Date: Wed, 15 Nov 2017 17:34:20 +0000 To: "commits@openwhisk.apache.org" Subject: [incubator-openwhisk-cli] 09/16: WIP Support retrieving status and configuration of feed triggers in CLI (#2893) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: csantanapr@apache.org In-Reply-To: <151076725189.2446.2709529532983299548@gitbox.apache.org> References: <151076725189.2446.2709529532983299548@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-openwhisk-cli X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: 31f4e0e5c57d34e3b038c3e805d69f67885ce436 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20171115173412.3595A81BE6@gitbox.apache.org> archived-at: Wed, 15 Nov 2017 17:34:15 -0000 This is an automated email from the ASF dual-hosted git repository. csantanapr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git commit 31f4e0e5c57d34e3b038c3e805d69f67885ce436 Author: Adnan Baruni AuthorDate: Wed Nov 8 16:01:20 2017 -0600 WIP Support retrieving status and configuration of feed triggers in CLI (#2893) * invoke feed action in trigger get command when appropriate to fetch configuration and status * account for annotations for non-feed triggers * scanCode * remove unused param * add tests validating correct lifecycle event. update feeds.md with new lifecycle event * scalafmt * remove commented block * combine feed trigger tests into one --- .../whisk/core/cli/test/WskBasicUsageTests.scala | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala b/tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala index abac6c2..feefb30 100644 --- a/tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala +++ b/tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala @@ -27,10 +27,8 @@ import scala.language.postfixOps import scala.concurrent.duration.Duration import scala.concurrent.duration.DurationInt import scala.util.Random - import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner - import common.TestHelpers import common.TestCLIUtils import common.TestUtils @@ -1126,6 +1124,24 @@ class WskBasicUsageTests extends TestHelpers with WskTestHelpers { } } + it should "invoke a feed action with the correct lifecyle event when creating, retrieving and deleting a feed trigger" in withAssetCleaner( + wskprops) { (wp, assetHelper) => + val actionName = "echo" + val triggerName = "feedTest" + + assetHelper.withCleaner(wsk.action, actionName) { (action, _) => + action.create(actionName, Some(TestUtils.getTestActionFilename("echo.js"))) + } + + try { + wsk.trigger.create(triggerName, feed = Some(actionName)).stdout should include(""""lifecycleEvent": "CREATE"""") + + wsk.trigger.get(triggerName).stdout should include(""""lifecycleEvent": "READ"""") + } finally { + wsk.trigger.delete(triggerName).stdout should include(""""lifecycleEvent": "DELETE"""") + } + } + it should "denote bound trigger parameters for trigger summaries" in withAssetCleaner(wskprops) { (wp, assetHelper) => val trgBoundParams = "trgBoundParams" val trgParamAnnot = "trgParamAnnot" -- To stop receiving notification emails like this one, please contact "commits@openwhisk.apache.org" .