File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
tests/src/test/scala/runtime/actionContainers Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSyst
227
227
initCode should be(200 )
228
228
val (runCode, out) = c.run(JsNull )
229
229
runCode should be(502 )
230
- out should be(Some (JsObject (" error" -> JsString (" The action did not return a dictionary." ))))
230
+ out should be(Some (JsObject (" error" -> JsString (" The action did not return a dictionary or array ." ))))
231
231
}
232
232
233
233
checkStreams(out, err, {
@@ -270,4 +270,20 @@ class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSyst
270
270
runRes.get.fields.get(" pwd_cmd" ) shouldBe Some (JsString (" /action" ))
271
271
}
272
272
}
273
+
274
+ it should " support array result" in {
275
+ withActionContainer() { c =>
276
+ val code = """
277
+ |#!/bin/bash
278
+ |echo '["a", "b"]'
279
+ """ .stripMargin.trim
280
+
281
+ val (initCode, initRes) = c.init(initPayload(code))
282
+ initCode should be(200 )
283
+
284
+ val (runCode, runRes) = c.runForJsArray(JsObject ())
285
+ runCode should be(200 )
286
+ runRes shouldBe Some (JsArray (JsString (" a" ), JsString (" b" )))
287
+ }
288
+ }
273
289
}
You can’t perform that action at this time.
0 commit comments