You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by be...@apache.org on 2017/08/02 19:37:44 UTC
[incubator-openwhisk] branch master updated: Clean Up CLI Tests
(#2541)
This is an automated email from the ASF dual-hosted git repository.
berstler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new 62cb0c6 Clean Up CLI Tests (#2541)
62cb0c6 is described below
commit 62cb0c631ccb1be7fca1117bd02556b3683ea7e6
Author: James Dubee <jw...@us.ibm.com>
AuthorDate: Wed Aug 2 15:37:41 2017 -0400
Clean Up CLI Tests (#2541)
* Assert CLI Exists in Wsk Object Constructor
* Remove getCLIPath
---
tests/src/test/scala/common/Wsk.scala | 12 ++++--------
tests/src/test/scala/system/basic/WskBasicTests.scala | 4 ----
tests/src/test/scala/system/basic/WskPackageTests.scala | 4 ----
.../test/scala/whisk/core/cli/test/WskBasicUsageTests.scala | 4 ----
4 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/tests/src/test/scala/common/Wsk.scala b/tests/src/test/scala/common/Wsk.scala
index ac489cf..ad17921 100644
--- a/tests/src/test/scala/common/Wsk.scala
+++ b/tests/src/test/scala/common/Wsk.scala
@@ -276,7 +276,6 @@ class WskAction()
with HasActivation {
override protected val noun = "action"
- override def baseCommand = Wsk.baseCommand
/**
* Creates action. Parameters mirror those available in the CLI.
@@ -1007,19 +1006,16 @@ trait WaitFor {
object Wsk {
private val binaryName = "wsk"
+ private val cliPath = if (WhiskProperties.useCLIDownload) getDownloadedGoCLIPath else WhiskProperties.getCLIPath
+
+ assert((new File(cliPath)).exists, s"did not find $cliPath")
/** What is the path to a downloaded CLI? **/
private def getDownloadedGoCLIPath = {
s"${System.getProperty("user.home")}${File.separator}.local${File.separator}bin${File.separator}${binaryName}"
}
- def exists() = {
- val cliPath = if (WhiskProperties.useCLIDownload) getDownloadedGoCLIPath else WhiskProperties.getCLIPath
- assert((new File(cliPath)).exists, s"did not find $cliPath")
- }
-
- def baseCommand() =
- if (WhiskProperties.useCLIDownload) Buffer(getDownloadedGoCLIPath) else Buffer(WhiskProperties.getCLIPath)
+ def baseCommand = Buffer(cliPath)
}
trait RunWskCmd extends Matchers {
diff --git a/tests/src/test/scala/system/basic/WskBasicTests.scala b/tests/src/test/scala/system/basic/WskBasicTests.scala
index f48a14d..61b4cf0 100644
--- a/tests/src/test/scala/system/basic/WskBasicTests.scala
+++ b/tests/src/test/scala/system/basic/WskBasicTests.scala
@@ -46,10 +46,6 @@ class WskBasicTests
behavior of "Wsk CLI"
- it should "confirm wsk exists" in {
- Wsk.exists
- }
-
it should "reject creating duplicate entity" in withAssetCleaner(wskprops) {
(wp, assetHelper) =>
val name = "testDuplicateCreate"
diff --git a/tests/src/test/scala/system/basic/WskPackageTests.scala b/tests/src/test/scala/system/basic/WskPackageTests.scala
index f196233..f844bbb 100644
--- a/tests/src/test/scala/system/basic/WskPackageTests.scala
+++ b/tests/src/test/scala/system/basic/WskPackageTests.scala
@@ -44,10 +44,6 @@ class WskPackageTests
behavior of "Wsk Package"
- it should "confirm wsk exists" in {
- Wsk.exists
- }
-
it should "allow creation and deletion of a package" in withAssetCleaner(wskprops) {
(wp, assetHelper) =>
val name = "simplepackage"
diff --git a/tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala b/tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala
index 354bbe7..a4109e7 100644
--- a/tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala
+++ b/tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala
@@ -65,10 +65,6 @@ class WskBasicUsageTests
behavior of "Wsk CLI usage"
- it should "confirm wsk exists" in {
- Wsk.exists
- }
-
it should "show help and usage info" in {
val stdout = wsk.cli(Seq()).stdout
stdout should include regex ("""(?i)Usage:""")
--
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].