KNOX-1395 - fix additional tests to align with removal of InetAddress use
authorLarry McCay <lmccay@apache.org>
Fri, 20 Jul 2018 20:55:30 +0000 (16:55 -0400)
committerLarry McCay <lmccay@apache.org>
Fri, 20 Jul 2018 20:56:52 +0000 (16:56 -0400)
gateway-spi/src/test/java/org/apache/knox/gateway/dispatch/GatewayDispatchFilterTest.java

index db08788..b5c3047 100644 (file)
@@ -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,