You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/07/14 21:35:43 UTC

[GitHub] rabbah commented on a change in pull request #2493: API gw test cleanup

rabbah commented on a change in pull request #2493: API gw test cleanup
URL: https://github.com/apache/incubator-openwhisk/pull/2493#discussion_r127553609
 
 

 ##########
 File path: tests/src/test/scala/whisk/core/cli/test/ApiGwTests.scala
 ##########
 @@ -1188,34 +1167,34 @@ class ApiGwTests
             rr.stdout should include regex (s"/[@\\w._\\-]+/${actionName}\\s+${testurlop}\\s+${testapiname}\\s+")
             rr.stdout should include(testbasepath + testrelpath)
         } finally {
-            val deleteresult = apiDelete(basepathOrApiName = testbasepath, expectedExitCode = DONTCARE_EXIT)
+            apiDelete(basepathOrApiName = testbasepath, expectedExitCode = DONTCARE_EXIT)
         }
     }
 
     it should "reject creation of an API from invalid YAML formatted API configuration file" in {
         val testName = "CLI_APIGWTEST22"
-        val testbasepath = "/"+testName+"_bp"
+        val testbasepath = "/" + testName + "_bp"
         val swaggerPath = TestUtils.getTestApiGwFilename(s"local.api.bad.yaml")
         try {
-            var rr = apiCreate(swagger = Some(swaggerPath), expectedExitCode = ANY_ERROR_EXIT)
+            val rr = apiCreate(swagger = Some(swaggerPath), expectedExitCode = ANY_ERROR_EXIT)
             println("api create stdout: " + rr.stdout)
             println("api create stderror: " + rr.stderr)
             rr.stderr should include("Unable to parse YAML configuration file")
         } finally {
-            val deleteresult = apiDelete(basepathOrApiName = testbasepath, expectedExitCode = DONTCARE_EXIT)
+            apiDelete(basepathOrApiName = testbasepath, expectedExitCode = DONTCARE_EXIT)
         }
     }
 
     it should "reject deletion of a non-existent api" in {
         val nonexistentApi = "/not-there"
 
-        var rr = apiDelete(basepathOrApiName = nonexistentApi, expectedExitCode = ANY_ERROR_EXIT)
-        rr.stderr should include (s"API '${nonexistentApi}' does not exist")
+        val rr = apiDelete(basepathOrApiName = nonexistentApi, expectedExitCode = ANY_ERROR_EXIT)
+        rr.stderr should include(s"API '${nonexistentApi}' does not exist")
     }
 
     it should "successfully list an API whose endpoints are not mapped to actions" in {
         val testName = "CLI_APIGWTEST23"
-        var testapiname = "A descriptive name"
+        val testapiname = "A descriptive name"
 
 Review comment:
   not yet - i think we should consider a standard formatter as part of scan code/Travis.
   
   Note that my change is for gratuitous use of s/var/val/g not changing and reusing asset cleaner to simplify the tests.
 
----------------------------------------------------------------
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