From commits-return-5376-archive-asf-public=cust-asf.ponee.io@openwhisk.apache.org Fri Jul 27 20:35:38 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 02420180657 for ; Fri, 27 Jul 2018 20:35:37 +0200 (CEST) Received: (qmail 61045 invoked by uid 500); 27 Jul 2018 18:35:37 -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 61036 invoked by uid 99); 27 Jul 2018 18:35:37 -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; Fri, 27 Jul 2018 18:35:37 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 947EA82A62; Fri, 27 Jul 2018 18:35:36 +0000 (UTC) Date: Fri, 27 Jul 2018 18:35:36 +0000 To: "commits@openwhisk.apache.org" Subject: [incubator-openwhisk] branch master updated: Add api gateway test that uses custom package for action. (#2941) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <153271653610.21525.2152177438918669256@gitbox.apache.org> From: rabbah@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-openwhisk X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 4fea23bc06831d66a54f61a8353926cfebd3cb3c X-Git-Newrev: 1a3e15ea95a48dae7ec17215b235b0167ff7137c X-Git-Rev: 1a3e15ea95a48dae7ec17215b235b0167ff7137c X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. rabbah pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git The following commit(s) were added to refs/heads/master by this push: new 1a3e15e Add api gateway test that uses custom package for action. (#2941) 1a3e15e is described below commit 1a3e15ea95a48dae7ec17215b235b0167ff7137c Author: John Sanda AuthorDate: Fri Jul 27 14:35:33 2018 -0400 Add api gateway test that uses custom package for action. (#2941) --- .../whisk/core/cli/test/ApiGwRestBasicTests.scala | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala b/tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala index f599675..97b903a 100644 --- a/tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala +++ b/tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala @@ -899,4 +899,37 @@ abstract class ApiGwRestBasicTests extends BaseApiGwTests { apiDelete(basepathOrApiName = testbasepath, expectedExitCode = DONTCARE_EXIT) } } + + it should "verify get API name that uses custom package" in { + val testName = "CLI_APIGWTEST25" + val testbasepath = "/" + testName + "_bp" + val testrelpath = "/path" + val testnewrelpath = "/path_new" + val testurlop = "get" + val testapiname = testName + " API Name" + val packageName = withTimestamp("pkg") + val actionName = packageName + "/" + testName + "_action" + try { + wsk.pkg.create(packageName).stdout should include regex (s""""name":\\s*"$packageName"""") + + // Create the action for the API. It must be a "web-action" action. + val file = TestUtils.getTestActionFilename(s"echo.js") + wsk.action.create(name = actionName, artifact = Some(file), expectedExitCode = 200, web = Some("true")) + + var rr = apiCreate( + basepath = Some(testbasepath), + relpath = Some(testrelpath), + operation = Some(testurlop), + action = Some(actionName), + apiname = Some(testapiname)) + verifyApiCreated(rr) + + rr = apiGet(basepathOrApiName = Some(testapiname)) + verifyApiList(rr, clinamespace, testName + "_action", testurlop, testbasepath, testrelpath, testapiname) + } finally { + wsk.action.delete(name = actionName, expectedExitCode = DONTCARE_EXIT) + apiDelete(basepathOrApiName = testbasepath, expectedExitCode = DONTCARE_EXIT) + wsk.pkg.delete(packageName).stdout should include regex (s""""name":\\s*"$packageName"""") + } + } }