You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ma...@apache.org on 2018/03/07 13:33:07 UTC
[incubator-openwhisk] branch master updated: Partially revert
change to route all action proxy tests through port mapping. (#3397)
This is an automated email from the ASF dual-hosted git repository.
markusthoemmes pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new a6f32f1 Partially revert change to route all action proxy tests through port mapping. (#3397)
a6f32f1 is described below
commit a6f32f11162d4256ef380c1780d19d5662b4136a
Author: rodric rabbah <ro...@gmail.com>
AuthorDate: Wed Mar 7 08:33:01 2018 -0500
Partially revert change to route all action proxy tests through port mapping. (#3397)
Partially revert change to route all action proxy tests through port forwarding. Instead, only do that when running tests on MacOSX.
---
.../scala/actionContainers/ActionContainer.scala | 26 +++++++++++++---------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/tests/src/test/scala/actionContainers/ActionContainer.scala b/tests/src/test/scala/actionContainers/ActionContainer.scala
index 4f6ef24..ccd6748 100644
--- a/tests/src/test/scala/actionContainers/ActionContainer.scala
+++ b/tests/src/test/scala/actionContainers/ActionContainer.scala
@@ -144,17 +144,21 @@ object ActionContainer {
}
// ...find out its IP address...
- val (ip, port) = if (WhiskProperties.getProperty("whisk.version.name") == "local") {
- val p = 8988 // port must be available or docker run will fail
- createContainer(Some(p))
- Thread.sleep(1500) // let container/server come up cleanly
- ("localhost", p)
- } else { // "mac"
- createContainer()
- val ipOut = awaitDocker(s"""inspect --format '{{.NetworkSettings.IPAddress}}' $name""", 10 seconds)
- assert(ipOut._1 == 0, "'docker inspect did not exit with 0")
- (ipOut._2.replaceAll("""[^0-9.]""", ""), 8080)
- }
+ val (ip, port) =
+ if (WhiskProperties.getProperty("whisk.version.name") == "local" &&
+ WhiskProperties.onMacOSX()) {
+ // on MacOSX, where docker for mac does not permit communicating with container directly
+ val p = 8988 // port must be available or docker run will fail
+ createContainer(Some(p))
+ Thread.sleep(1500) // let container/server come up cleanly
+ ("localhost", p)
+ } else {
+ // not "mac" i.e., docker-for-mac, use direct container IP directly (this is OK for Ubuntu, and docker-machine)
+ createContainer()
+ val ipOut = awaitDocker(s"""inspect --format '{{.NetworkSettings.IPAddress}}' $name""", 10 seconds)
+ assert(ipOut._1 == 0, "'docker inspect did not exit with 0")
+ (ipOut._2.replaceAll("""[^0-9.]""", ""), 8080)
+ }
// ...we create an instance of the mock container interface...
val mock = new ActionContainer {
--
To stop receiving notification emails like this one, please contact
markusthoemmes@apache.org.