knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject knox git commit: KNOX-1395 - fix additional tests to align with removal of InetAddress use
Date Fri, 20 Jul 2018 20:56:59 GMT
Repository: knox
Updated Branches:
  refs/heads/master 2134f080a -> 45c0de9de


KNOX-1395 - fix additional tests to align with removal of InetAddress use


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/45c0de9d
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/45c0de9d
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/45c0de9d

Branch: refs/heads/master
Commit: 45c0de9dee9fcfca15b30ac11725f96b3669e2ab
Parents: 2134f08
Author: Larry McCay <lmccay@apache.org>
Authored: Fri Jul 20 16:55:30 2018 -0400
Committer: Larry McCay <lmccay@apache.org>
Committed: Fri Jul 20 16:56:52 2018 -0400

----------------------------------------------------------------------
 .../knox/gateway/dispatch/GatewayDispatchFilterTest.java    | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/45c0de9d/gateway-spi/src/test/java/org/apache/knox/gateway/dispatch/GatewayDispatchFilterTest.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/test/java/org/apache/knox/gateway/dispatch/GatewayDispatchFilterTest.java
b/gateway-spi/src/test/java/org/apache/knox/gateway/dispatch/GatewayDispatchFilterTest.java
index db08788..b5c3047 100644
--- a/gateway-spi/src/test/java/org/apache/knox/gateway/dispatch/GatewayDispatchFilterTest.java
+++ b/gateway-spi/src/test/java/org/apache/knox/gateway/dispatch/GatewayDispatchFilterTest.java
@@ -137,7 +137,7 @@ public class GatewayDispatchFilterTest {
                                    null,
                                    serviceRole,
                                    "http://localhost:9999",
-                                   shouldExpectLocalhost());
+                                   true);
   }
 
   /**
@@ -152,7 +152,7 @@ public class GatewayDispatchFilterTest {
                                    null,
                                    serviceRole,
                                    URLEncoder.encode("http://localhost:9999", "UTF-8"),
-                                   shouldExpectLocalhost());
+                                   true);
   }
 
 
@@ -230,11 +230,6 @@ public class GatewayDispatchFilterTest {
   }
 
 
-  private static boolean shouldExpectLocalhost() throws Exception {
-    return InetAddress.getLocalHost().getCanonicalHostName().equalsIgnoreCase("localhost");
-  }
-
-
   private void doTestServiceDispatchWhitelist(List<String> whitelistedServices,
                                               String       whitelist,
                                               String       serviceRole,


Mime
View raw message