You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/03/30 20:03:30 UTC

[GitHub] dubee commented on a change in pull request #262: rely on single base test versions from incubator openwhisk

dubee commented on a change in pull request #262: rely on single base test versions from incubator openwhisk
URL: https://github.com/apache/incubator-openwhisk-cli/pull/262#discussion_r178364611
 
 

 ##########
 File path: tests/src/test/scala/system/basic/WskCliActionTests.scala
 ##########
 @@ -20,9 +20,33 @@ package system.basic
 import org.junit.runner.RunWith
 import org.scalatest.junit.JUnitRunner
 
+import common.TestCLIUtils
+import common.TestUtils.NOT_ALLOWED
 import common.Wsk
 
 @RunWith(classOf[JUnitRunner])
 class WskCliActionTests extends WskActionTests {
   override val wsk = new Wsk
+
+  it should "create an action with an empty file" in withAssetCleaner(wskprops) { (wp, assetHelper) =>
+    val name = "empty"
+    assetHelper.withCleaner(wsk.action, name) { (action, _) =>
+      action.create(name, Some(TestCLIUtils.getTestActionFilename("empty.js")))
+    }
+  }
+
+  it should "not be able to use --kind and --docker at the same time when running action create" in {
+    val file = TestCLIUtils.getTestActionFilename(s"echo.js")
+    val out = wsk.action.create(name = "kindAndDockerAction", artifact = Some(file), expectedExitCode = NOT_ALLOWED,
+        kind = Some("nodejs:6"), docker = Some("mydockerimagename"))
+    out.stderr should include("Cannot specify both --kind and --docker at the same time")
+  }
+
+  it should "not be able to use --kind and --docker at the same time when running action update" in {
 
 Review comment:
   Generally I've been using `Seq` to test permutations like below:
   ```
   Seq(false, true).foreach { updateValue =>
     val out = wsk.action.create(name = "kindAndDockerAction", artifact = Some(file), expectedExitCode = NOT_ALLOWED, kind = Some("nodejs:6"), docker = Some("mydockerimagename"), update = updateValue)
     out.stderr should include("Cannot specify both --kind and --docker at the same time")
   }
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services