drcariel closed pull request #3531: More test clean up
URL: https://github.com/apache/incubator-openwhisk/pull/3531
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/build.gradle b/tests/build.gradle
index 70eaa309c2..df0ab0dce0 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 e15f030296..f7f03f6bbb 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 57a5442ed8..7c948bf79e 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 9df9bcb4c0..d03d346e89 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 6584a1c6b8..34e2b5c429 100644
--- a/tests/src/test/scala/system/basic/WskBasicTests.scala
+++ b/tests/src/test/scala/system/basic/WskRestBasicTests.scala
@@ -41,17 +41,12 @@ 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
    */
diff --git a/tests/src/test/scala/system/basic/WskRuleTests.scala 
b/tests/src/test/scala/system/basic/WskRuleTests.scala
index 279e330e5f..29c99eac54 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 90b24346e7..b520951689 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 3fb8d2da17..fa920b5074 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 50d4c575d1..a7a6fe0349 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


 

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


With regards,
Apache Git Services

Reply via email to