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/12/12 14:39:16 UTC

[GitHub] rabbah commented on a change in pull request #4167: Add tid from header to RestResult in tests.

rabbah commented on a change in pull request #4167: Add tid from header to RestResult in tests.
URL: https://github.com/apache/incubator-openwhisk/pull/4167#discussion_r241038570
 
 

 ##########
 File path: tests/src/test/scala/common/rest/WskRestOperations.scala
 ##########
 @@ -1319,6 +1297,15 @@ trait RunRestCmd extends Matchers with ScalaFutures with SwaggerValidator {
     Try(resp.entity.toStrict(timeout).map { _.data }.map(_.utf8String).futureValue).getOrElse("")
   }
 
+  def getTransactionId(resp: HttpResponse): String = {
+    val tidHeader = resp.headers.find(_.is(TransactionId.generatorConfig.lowerCaseHeader))
+    withClue(
+      s"The header ${TransactionId.generatorConfig} is not set. This means that the request did not reach nginx (and not controller if nginx is skipped in that test).") {
+      tidHeader shouldBe defined
+    }
+    tidHeader.get.value()
 
 Review comment:
   `and not controller if nginx is skipped in that test` -> `or the controller if nginx is skipped in that test`

----------------------------------------------------------------
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