File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
tests/src/test/scala/runtime/actionContainers Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSyst
271
271
}
272
272
}
273
273
274
- it should " support array result" in {
274
+ it should " support return array result" in {
275
275
withActionContainer() { c =>
276
276
val code = """
277
277
|#!/bin/bash
@@ -281,7 +281,24 @@ class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSyst
281
281
val (initCode, initRes) = c.init(initPayload(code))
282
282
initCode should be(200 )
283
283
284
- val (runCode, runRes) = c.runForJsArray(JsObject ())
284
+ val (runCode, runRes) = c.runForJsArray(runPayload(JsObject ()))
285
+ runCode should be(200 )
286
+ runRes shouldBe Some (JsArray (JsString (" a" ), JsString (" b" )))
287
+ }
288
+ }
289
+
290
+ it should " support array as input param" in {
291
+ withActionContainer() { c =>
292
+ val code = """
293
+ |#!/bin/bash
294
+ |arr=$1
295
+ |echo $arr
296
+ """ .stripMargin.trim
297
+
298
+ val (initCode, initRes) = c.init(initPayload(code))
299
+ initCode should be(200 )
300
+
301
+ val (runCode, runRes) = c.runForJsArray(runPayload(JsArray (JsString (" a" ), JsString (" b" ))))
285
302
runCode should be(200 )
286
303
runRes shouldBe Some (JsArray (JsString (" a" ), JsString (" b" )))
287
304
}
You can’t perform that action at this time.
0 commit comments