]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/ping/TestDNS.java
UPD: Assume ping-env tests
[gigi.git] / tests / org / cacert / gigi / ping / TestDNS.java
index 761694513c3f6e7783506820b47fb18d33b4d734..a298cdca3068bb4c0d7abfb0224851449be27753 100644 (file)
@@ -1,6 +1,7 @@
 package org.cacert.gigi.ping;
 
 import static org.junit.Assert.*;
+import static org.junit.Assume.*;
 
 import java.io.IOException;
 import java.net.URL;
@@ -11,7 +12,7 @@ import java.util.regex.Pattern;
 
 import javax.naming.NamingException;
 
-import org.cacert.gigi.pages.account.DomainOverview;
+import org.cacert.gigi.pages.account.domain.DomainOverview;
 import org.cacert.gigi.testUtils.IOUtils;
 import org.cacert.gigi.testUtils.PingTest;
 import org.cacert.gigi.testUtils.TestEmailReciever.TestMail;
@@ -60,6 +61,7 @@ public class TestDNS extends PingTest {
     public void testEmailAndDNS(int dnsVariant, int emailVariant, boolean successDNS, boolean successMail) throws IOException, InterruptedException, SQLException, NamingException {
 
         String test = getTestProps().getProperty("domain.dnstest");
+        assumeNotNull(test);
 
         URL u = new URL("https://" + getServerName() + DomainOverview.PATH);
         Matcher m = initailizeDomainForm(u);
@@ -91,8 +93,11 @@ public class TestDNS extends PingTest {
 
     private String readDNS(String token) throws NamingException {
         String test = getTestProps().getProperty("domain.dnstest");
-        String targetDomain = "cacert-" + token + "." + test;
-        String[] data = DNSUtil.getTXTEntries(targetDomain, getTestProps().getProperty("domain.testns"));
+        assumeNotNull(test);
+        String targetDomain = token + "._cacert._auth." + test;
+        String testns = getTestProps().getProperty("domain.testns");
+        assumeNotNull(testns);
+        String[] data = DNSUtil.getTXTEntries(targetDomain, testns);
         assertEquals(1, data.length);
         return data[0];