From issues-return-36619-archive-asf-public=cust-asf.ponee.io@openwhisk.incubator.apache.org Mon Apr 15 14:56:48 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 260B918064C for ; Mon, 15 Apr 2019 16:56:48 +0200 (CEST) Received: (qmail 28960 invoked by uid 500); 15 Apr 2019 14:56:47 -0000 Mailing-List: contact issues-help@openwhisk.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.incubator.apache.org Delivered-To: mailing list issues@openwhisk.incubator.apache.org Received: (qmail 28949 invoked by uid 99); 15 Apr 2019 14:56:47 -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; Mon, 15 Apr 2019 14:56:47 +0000 From: GitBox To: issues@openwhisk.apache.org Subject: [GitHub] [incubator-openwhisk-devtools] mrutkows commented on a change in pull request #247: updating starter kit Message-ID: <155534020324.12728.2708158444446681153.gitbox@gitbox.apache.org> Date: Mon, 15 Apr 2019 14:56:43 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit mrutkows commented on a change in pull request #247: updating starter kit URL: https://github.com/apache/incubator-openwhisk-devtools/pull/247#discussion_r275402391 ########## File path: actionloop-starter-kit/tests/src/test/scala/runtime/actionContainers/SingleTest.scala ########## @@ -0,0 +1,40 @@ +package runtime.actionContainers + + +import actionContainers.ActionContainer.withContainer +import actionContainers.{ActionContainer, ActionProxyContainerTestUtils} +import common.WskActorSystem +import org.junit.runner.RunWith +import org.scalatest.junit.JUnitRunner +import spray.json.{JsonParser} + +@RunWith(classOf[JUnitRunner]) +class SingleTest extends ActionProxyContainerTestUtils with WskActorSystem { + lazy val imageName = "actionloop-demo-python-v3.7" + + def withActionContainer(env: Map[String, String] = Map.empty)(code: ActionContainer => Unit) = { + withContainer(imageName, env)(code) + } + + behavior of imageName + + val code = + """|import sys + |def main(args): + | print("hello stdout", file=sys.stdout) + | print("hello stderr", file=sys.stderr) + | return args + |""".stripMargin + + + val data = JsonParser("""{"name":"Mike"}""") + + it should "return an echo of the input" in { + val (out, err) = withActionContainer() { c => + val (initCode, _) = c.init(initPayload(code)) + initCode should be(200) + val (runCode, runRes) = c.run(runPayload(data)) + runCode should be(200) + } + } +} Review comment: Please fix Travis EOL scancode break. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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