markusthoemmes commented on a change in pull request #3077: Enable ssl on the
path between edge and controllers
URL:
https://github.com/apache/incubator-openwhisk/pull/3077#discussion_r155742902
##########
File path: tests/src/test/scala/services/HeadersTests.scala
##########
@@ -67,15 +66,19 @@ class HeadersTests extends FlatSpec with Matchers with
ScalaFutures with WskActo
val allMethods = Some(Set(DELETE.name, GET.name, POST.name, PUT.name))
val allowOrigin = `Access-Control-Allow-Origin`.*
val allowHeaders = `Access-Control-Allow-Headers`("Authorization",
"Content-Type")
- val url = Uri(s"http://${WhiskProperties.getBaseControllerAddress()}")
+ val url = Uri(s"https://${WhiskProperties.getBaseControllerAddress()}")
def request(method: HttpMethod, uri: Uri, headers: Option[Seq[HttpHeader]] =
None): Future[HttpResponse] = {
val httpRequest = headers match {
case Some(headers) => HttpRequest(method, uri, headers)
case None => HttpRequest(method, uri)
}
+ val sslConfig = AkkaSSLConfig().mapSettings { s =>
+
s.withHostnameVerifierClass(classOf[AcceptAllHostNameVerifier].asInstanceOf[Class[HostnameVerifier]])
+ }
Review comment:
Can we do this in a generalized way since our Rest testcases need the same
"functionality". Maybe we can have a `testReques(req: HttpRequest)` which does
the same as
```scala
Http().singleRequest(httpRequest, connectionContext = connectionContext)
```
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services