Make OW run with docker for mac (#1790)


* Add documentation for docker for mac (#1431)
* Replace akka-http client to play-ws client (temporarily)
* Introduce docker-machine environment
diff --git a/.gitignore b/.gitignore
index 76fd0f8..437ce4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,7 +43,7 @@
 .idea
 
 # Ansible
-ansible/environments/mac/hosts
+ansible/environments/docker-machine/hosts
 ansible/db_local.ini*
 ansible/tmp/*
 ansible/roles/nginx/files/*.csr
diff --git a/tests/build.gradle b/tests/build.gradle
index f80e47e..3a07e70 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -7,6 +7,8 @@
 }
 
 tasks.withType(Test) {
+    systemProperties(System.getProperties())
+
     testLogging {
         events "passed", "skipped", "failed"
         showStandardStreams = true
@@ -50,6 +52,7 @@
     compile 'com.typesafe.akka:akka-testkit_2.11:2.4.16'
     compile 'com.google.code.gson:gson:2.3.1'
     compile 'org.scalamock:scalamock-scalatest-support_2.11:3.4.2'
+    compile 'com.typesafe.play:play-ws_2.11:2.5.11'
 
     compile project(':common:scala')
     compile project(':core:controller')
diff --git a/tests/src/test/scala/actionContainers/ActionContainer.scala b/tests/src/test/scala/actionContainers/ActionContainer.scala
index f74f3c4..978114d 100644
--- a/tests/src/test/scala/actionContainers/ActionContainer.scala
+++ b/tests/src/test/scala/actionContainers/ActionContainer.scala
@@ -161,12 +161,10 @@
 
     private def syncPost(host: String, port: Int, endPoint: String, content: JsValue)(
         implicit actorSystem: ActorSystem): (Int, Option[JsObject]) = {
-        import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
-        import akka.http.scaladsl.marshalling._
         import akka.http.scaladsl.model._
         import akka.http.scaladsl.unmarshalling._
         import akka.stream.ActorMaterializer
-        import whisk.core.container.AkkaHttpUtils
+        import common.AkkaHttpUtils
 
         implicit val materializer = ActorMaterializer()
 
@@ -176,10 +174,8 @@
             path = Uri.Path(endPoint))
 
         val f = for (
-            entity <- Marshal(content).to[MessageEntity];
-            request = HttpRequest(method = HttpMethods.POST, uri = uri, entity = entity);
-            response <- AkkaHttpUtils.singleRequest(request, 90.seconds, retryOnTCPErrors = true);
-            responseBody <- Unmarshal(response.entity).to[String]
+            response <- AkkaHttpUtils.singleRequest(uri.toString(), content, 90.seconds, retryOnTCPErrors = true);
+            responseBody <- Unmarshal(response.body).to[String]
         ) yield (response.status.intValue, Try(responseBody.parseJson.asJsObject).toOption)
 
         Await.result(f, 90.seconds)