@@ -30,13 +30,7 @@ import common.TestUtils
3030import common .WskActorSystem
3131import spray .json ._
3232
33- @ RunWith (classOf [JUnitRunner ])
34- class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSystem {
35-
36- override def withActionContainer (env : Map [String , String ] = Map .empty)(code : ActionContainer => Unit ) = {
37- withContainer(" dockerskeleton" , env)(code)
38- }
39-
33+ object CodeSamples {
4034 val codeNotReturningJson = """
4135 |#!/bin/sh
4236 |echo not a json object
@@ -149,6 +143,25 @@ class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSyst
149143
150144 Seq ((" bash" , bash), (" python" , python), (" perl" , perl))
151145 }
146+ }
147+
148+ @ RunWith (classOf [JUnitRunner ])
149+ class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSystem {
150+
151+ override def withActionContainer (env : Map [String , String ] = Map .empty)(code : ActionContainer => Unit ) = {
152+ withContainer(" dockerskeleton" , env)(code)
153+ }
154+
155+ override val testNoSourceOrExec = TestConfig (" " , hasCodeStub = true )
156+ override val testNotReturningJson = TestConfig (CodeSamples .codeNotReturningJson, enforceEmptyOutputStream = false )
157+ override val testInitCannotBeCalledMoreThanOnce = TestConfig (CodeSamples .codeNotReturningJson)
158+ // the skeleton requires the executable to be called /action/exec, this test will pass with any "main"
159+ override val testEntryPointOtherThanMain =
160+ TestConfig (CodeSamples .stdLargeInputSamples(0 )._2, main = " exec" , false , true )
161+ override val testEcho = TestConfig (CodeSamples .stdCodeSamples(0 )._2)
162+ override val testUnicode = TestConfig (CodeSamples .stdUnicodeSamples(0 )._2)
163+ override val testEnv = TestConfig (CodeSamples .stdEnvSamples(0 )._2)
164+ override val testLargeInput = TestConfig (CodeSamples .stdLargeInputSamples(0 )._2)
152165
153166 behavior of " openwhisk/dockerskeleton"
154167
@@ -239,11 +252,4 @@ class ActionProxyContainerTests extends BasicActionRunnerTests with WskActorSyst
239252 e shouldBe empty
240253 })
241254 }
242-
243- testNotReturningJson(codeNotReturningJson, checkResultInLogs = true )
244- testEcho(stdCodeSamples)
245- testUnicode(stdUnicodeSamples)
246- testEnv(stdEnvSamples)
247- testLargeInput(stdLargeInputSamples)
248- testInitCannotBeCalledMoreThanOnce(codeNotReturningJson) // any code sample will do
249255}
0 commit comments