This is an automated email from the ASF dual-hosted git repository.

dubeejw 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 caeb580  More test clean up (#3531)
caeb580 is described below

commit caeb580a3bea2fc17bd0f70b6c1cfac1c25145a7
Author: David Cariello <drcar...@us.ibm.com>
AuthorDate: Thu Apr 12 14:46:47 2018 -0500

    More test clean up (#3531)
    
    * rename select tests to reflect Rest testing and some util cleanup
    
    * fix duplicate function declarations
---
 tests/build.gradle                                                 | 4 ++--
 tests/src/test/scala/common/Wsk.scala                              | 2 +-
 tests/src/test/scala/common/WskTestHelpers.scala                   | 2 ++
 tests/src/test/scala/system/basic/WskConsoleTests.scala            | 5 -----
 .../system/basic/{WskBasicTests.scala => WskRestBasicTests.scala}  | 7 +------
 tests/src/test/scala/system/basic/WskRuleTests.scala               | 5 -----
 .../core/cli/test/{ApiGwTests.scala => ApiGwRestBasicTests.scala}  | 2 +-
 tests/src/test/scala/whisk/core/cli/test/ApiGwRestTests.scala      | 2 +-
 .../{WskBasicUsageTests.scala => WskRestBasicUsageTests.scala}     | 2 +-
 9 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/tests/build.gradle b/tests/build.gradle
index 70eaa30..df0ab0d 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -26,7 +26,7 @@ task testLean(type: Test) {
     exclude '**/*Java*'
     exclude '**/*ThrottleTests*'
     exclude '**/MaxActionDurationTests*'
-    exclude '**/*ApiGwTests*'
+    exclude '**/*ApiGwRestBasicTests*'
     exclude '**/*WskCli*'
 }
 
@@ -36,7 +36,7 @@ task testLeanCli(type: Test) {
     exclude '**/*Java*'
     exclude '**/*ThrottleTests*'
     exclude '**/MaxActionDurationTests*'
-    exclude '**/*ApiGwTests*'
+    exclude '**/*ApiGwRestBasicTests*'
     exclude '**/*Rest*'
 }
 
diff --git a/tests/src/test/scala/common/Wsk.scala 
b/tests/src/test/scala/common/Wsk.scala
index e15f030..f7f03f6 100644
--- a/tests/src/test/scala/common/Wsk.scala
+++ b/tests/src/test/scala/common/Wsk.scala
@@ -743,7 +743,7 @@ class WskNamespace() extends RunWskCmd with 
FullyQualifiedNames with BaseNamespa
    * @return namespace as string
    */
   override def whois()(implicit wskprops: WskProps): String = {
-    // the invariant that list() returns a conforming result is enforced in a 
test in WskBasicTests
+    // the invariant that list() returns a conforming result is enforced in a 
test in WskRestBasicTests
     val ns = list().stdout.lines.toSeq.last.trim
     assert(ns != "_") // this is not permitted
     ns
diff --git a/tests/src/test/scala/common/WskTestHelpers.scala 
b/tests/src/test/scala/common/WskTestHelpers.scala
index 57a5442..7c948bf 100644
--- a/tests/src/test/scala/common/WskTestHelpers.scala
+++ b/tests/src/test/scala/common/WskTestHelpers.scala
@@ -294,4 +294,6 @@ trait WskTestHelpers extends Matchers {
       wskadmin.cli(Seq("user", "delete", subject), expectedExitCode).stdout 
should include("Subject deleted")
     }
   }
+  //Append the current timestamp in ms
+  def withTimestamp(text: String) = s"${text}-${System.currentTimeMillis}"
 }
diff --git a/tests/src/test/scala/system/basic/WskConsoleTests.scala 
b/tests/src/test/scala/system/basic/WskConsoleTests.scala
index 9df9bcb..d03d346 100644
--- a/tests/src/test/scala/system/basic/WskConsoleTests.scala
+++ b/tests/src/test/scala/system/basic/WskConsoleTests.scala
@@ -46,11 +46,6 @@ abstract class WskConsoleTests extends TestHelpers with 
WskTestHelpers {
   val wsk: BaseWsk
   val guestNamespace = wskprops.namespace
 
-  /**
-   * Append the current timestamp in ms
-   */
-  def withTimestamp(text: String) = s"${text}-${System.currentTimeMillis}"
-
   behavior of "Wsk Activation Console"
 
   it should "show an activation log message for hello world" in 
withAssetCleaner(wskprops) { (wp, assetHelper) =>
diff --git a/tests/src/test/scala/system/basic/WskBasicTests.scala 
b/tests/src/test/scala/system/basic/WskRestBasicTests.scala
similarity index 99%
rename from tests/src/test/scala/system/basic/WskBasicTests.scala
rename to tests/src/test/scala/system/basic/WskRestBasicTests.scala
index 6b33086..7412f9b 100644
--- a/tests/src/test/scala/system/basic/WskBasicTests.scala
+++ b/tests/src/test/scala/system/basic/WskRestBasicTests.scala
@@ -41,18 +41,13 @@ import spray.json.DefaultJsonProtocol._
 import whisk.http.Messages
 
 @RunWith(classOf[JUnitRunner])
-class WskBasicTests extends TestHelpers with WskTestHelpers {
+class WskRestBasicTests extends TestHelpers with WskTestHelpers {
 
   implicit val wskprops: common.WskProps = WskProps()
   val wsk: common.rest.WskRest = new WskRest
   val defaultAction: Some[String] = 
Some(TestUtils.getTestActionFilename("hello.js"))
 
   /**
-   * Append the current timestamp in ms
-   */
-  def withTimestamp(text: String) = s"${text}-${System.currentTimeMillis}"
-
-  /**
    * Retry operations that need to settle the controller cache
    */
   def cacheRetry[T](fn: => T) = whisk.utils.retry(fn, 5, Some(1.second))
diff --git a/tests/src/test/scala/system/basic/WskRuleTests.scala 
b/tests/src/test/scala/system/basic/WskRuleTests.scala
index 279e330..29c99ea 100644
--- a/tests/src/test/scala/system/basic/WskRuleTests.scala
+++ b/tests/src/test/scala/system/basic/WskRuleTests.scala
@@ -74,11 +74,6 @@ abstract class WskRuleTests extends TestHelpers with 
WskTestHelpers {
     }
   }
 
-  /**
-   * Append the current timestamp in ms
-   */
-  def withTimestamp(text: String) = s"$text-${System.currentTimeMillis}"
-
   behavior of "Whisk rules"
 
   it should "invoke the action attached on trigger fire, creating an 
activation for each entity including the cause" in withAssetCleaner(
diff --git a/tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala 
b/tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala
similarity index 99%
rename from tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala
rename to tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala
index 90b2434..b520951 100644
--- a/tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala
+++ b/tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala
@@ -34,7 +34,7 @@ import common.WskProps
  * Tests for testing the CLI "api" subcommand.  Most of these tests require a 
deployed backend.
  */
 @RunWith(classOf[JUnitRunner])
-abstract class ApiGwTests extends BaseApiGwTests {
+abstract class ApiGwRestBasicTests extends BaseApiGwTests {
 
   val clinamespace = wsk.namespace.whois()
   val createCode: Int
diff --git a/tests/src/test/scala/whisk/core/cli/test/ApiGwRestTests.scala 
b/tests/src/test/scala/whisk/core/cli/test/ApiGwRestTests.scala
index 869afe2..43a95be 100644
--- a/tests/src/test/scala/whisk/core/cli/test/ApiGwRestTests.scala
+++ b/tests/src/test/scala/whisk/core/cli/test/ApiGwRestTests.scala
@@ -33,7 +33,7 @@ import java.io.File
  * Tests for testing the CLI "api" subcommand.  Most of these tests require a 
deployed backend.
  */
 @RunWith(classOf[JUnitRunner])
-class ApiGwRestTests extends ApiGwTests with RestUtil {
+class ApiGwRestTests extends ApiGwRestBasicTests with RestUtil {
   override lazy val wsk = new WskRest
   override lazy val createCode = OK.intValue
 
diff --git a/tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala 
b/tests/src/test/scala/whisk/core/cli/test/WskRestBasicUsageTests.scala
similarity index 99%
rename from tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala
rename to tests/src/test/scala/whisk/core/cli/test/WskRestBasicUsageTests.scala
index 9588923..c625c2d 100644
--- a/tests/src/test/scala/whisk/core/cli/test/WskBasicUsageTests.scala
+++ b/tests/src/test/scala/whisk/core/cli/test/WskRestBasicUsageTests.scala
@@ -48,7 +48,7 @@ import whisk.http.Messages
  * Tests for basic CLI usage. Some of these tests require a deployed backend.
  */
 @RunWith(classOf[JUnitRunner])
-class WskBasicUsageTests extends TestHelpers with WskTestHelpers {
+class WskRestBasicUsageTests extends TestHelpers with WskTestHelpers {
 
   implicit val wskprops: common.WskProps = WskProps()
   val wsk: common.rest.WskRest = new WskRest

-- 
To stop receiving notification emails like this one, please contact
dube...@apache.org.

Reply via email to