rabbah commented on a change in pull request #3202: Support action continuations in the controller URL: https://github.com/apache/incubator-openwhisk/pull/3202#discussion_r162954421
########## File path: tests/src/test/scala/system/basic/WskConductorTests.scala ########## @@ -0,0 +1,311 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package system.basic + +import scala.concurrent.duration.DurationInt +import scala.language.postfixOps + +import org.junit.runner.RunWith +import org.scalatest.junit.JUnitRunner + +import common.ActivationResult +import common.StreamLogging +import common.JsHelpers +import common.TestHelpers +import common.TestUtils +import common.BaseWsk +import common.WskProps +import common.WskTestHelpers + +import spray.json._ +import spray.json.DefaultJsonProtocol._ +import spray.json.JsObject +import spray.json.pimpAny + +import whisk.core.entity.size.SizeInt +import whisk.core.WhiskConfig +import whisk.http.Messages._ + +@RunWith(classOf[JUnitRunner]) +abstract class WskConductorTests extends TestHelpers with WskTestHelpers with JsHelpers with StreamLogging { + + implicit val wskprops = WskProps() + val wsk: BaseWsk + val allowedActionDuration = 120 seconds + + val testString = "this is a test" + val invalid = "invalid#Action" + val missing = "missingAction" + + val whiskConfig = new WhiskConfig(Map(WhiskConfig.actionSequenceMaxLimit -> null)) + assert(whiskConfig.isValid) + val limit = whiskConfig.actionSequenceLimit.toInt + + behavior of "Whisk conductor controller" + + it should "invoke a conductor action with no dynamic steps" in withAssetCleaner(wskprops) { (wp, assetHelper) => + val echo = "echo" // echo conductor action + assetHelper.withCleaner(wsk.action, echo) { (action, _) => + action.create( + echo, + Some(TestUtils.getTestActionFilename("echo.js")), + annotations = Map("conductor" -> true.toJson)) Review comment: in this test, you're validating that a conductor annotation does not modify the behavior of a "classic action" - is that correct? ---------------------------------------------------------------- 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