summaryrefslogtreecommitdiffstats
path: root/cadi/client/src/test
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-09-04 19:41:24 -0500
committerInstrumental <jonathan.gathman@att.com>2019-09-04 19:41:51 -0500
commitc5aaaeeb8a4c008fa4a576c55da4c3bf703acdac (patch)
treedf48d917f868dc110734afc48c50478b58c697ad /cadi/client/src/test
parent4fbae1b6a5de191a9e26361ce6d1b8958be53f9e (diff)
K8s doesn't necessarily support DNS
Issue-ID: AAF-963 Change-Id: I65248837fc217b0ccc09f2afe02e14c716ca5bcc Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi/client/src/test')
-rw-r--r--cadi/client/src/test/java/org/onap/aaf/cadi/locator/test/JU_DNSLocator.java31
1 files changed, 21 insertions, 10 deletions
diff --git a/cadi/client/src/test/java/org/onap/aaf/cadi/locator/test/JU_DNSLocator.java b/cadi/client/src/test/java/org/onap/aaf/cadi/locator/test/JU_DNSLocator.java
index dfc7142a..b786cf68 100644
--- a/cadi/client/src/test/java/org/onap/aaf/cadi/locator/test/JU_DNSLocator.java
+++ b/cadi/client/src/test/java/org/onap/aaf/cadi/locator/test/JU_DNSLocator.java
@@ -21,17 +21,20 @@
package org.onap.aaf.cadi.locator.test;
-import static org.junit.Assert.*;
-import static org.hamcrest.CoreMatchers.*;
-import org.junit.*;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.net.URI;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.aaf.cadi.Access.Level;
+import org.onap.aaf.cadi.Locator.Item;
import org.onap.aaf.cadi.LocatorException;
import org.onap.aaf.cadi.PropAccess;
-import org.onap.aaf.cadi.Locator.Item;
import org.onap.aaf.cadi.locator.DNSLocator;
public class JU_DNSLocator {
@@ -73,12 +76,20 @@ public class JU_DNSLocator {
new DNSLocator(access, "https", "localhost", "8100");
new DNSLocator(access, "https", "localhost", "8100-8101");
- new DNSLocator(access, "http:localhost");
- new DNSLocator(access, "https:localhost");
- new DNSLocator(access, "https:localhost:8100");
- new DNSLocator(access, "https:localhost:[8100]");
- new DNSLocator(access, "https:localhost:[8100-8101]");
- new DNSLocator(access, "https:localhost:8000/");
+ new DNSLocator(access, "http://localhost");
+ new DNSLocator(access, "https://localhost");
+ new DNSLocator(access, "https://localhost:8100");
+ new DNSLocator(access, "https://localhost:[8100]");
+ new DNSLocator(access, "https://localhost:[8100-8101]");
+ new DNSLocator(access, "https://localhost:8000/");
+ new DNSLocator(access, "https://aaf-locatexx.onapxxx:8095/locate");
+ try {
+ new DNSLocator(access, "https:localhost:8000");
+ fail("Invalid URL should not pass");
+ } catch (LocatorException e) {
+ access.log(Level.DEBUG, "Valid Exception");
+
+ }
}
@Test