package org.cacert.gigi.ping;
import static org.junit.Assert.*;
+import static org.junit.Assume.*;
import java.io.IOException;
import java.net.URL;
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);
private String readDNS(String token) throws NamingException {
String test = getTestProps().getProperty("domain.dnstest");
+ assumeNotNull(test);
String targetDomain = token + "._cacert._auth." + test;
- String[] data = DNSUtil.getTXTEntries(targetDomain, getTestProps().getProperty("domain.testns"));
+ String testns = getTestProps().getProperty("domain.testns");
+ assumeNotNull(testns);
+ String[] data = DNSUtil.getTXTEntries(targetDomain, testns);
assertEquals(1, data.length);
return data[0];
package org.cacert.gigi.ping;
import static org.junit.Assert.*;
+import static org.junit.Assume.*;
import java.io.IOException;
import java.io.InputStreamReader;
public void testEmailAndHTTP(int httpVariant, int emailVariant, boolean successHTTP, boolean successMail) throws IOException, InterruptedException, SQLException {
String test = getTestProps().getProperty("domain.http");
+ assumeNotNull(test);
URL u = new URL("https://" + getServerName() + DomainOverview.PATH);
Matcher m = initailizeDomainForm(u);
}
private String readHTTP(String token) throws IOException {
- URL u = new URL("http://" + getTestProps().getProperty("domain.http") + "/cacert-" + token + ".txt");
+ String httpDom = getTestProps().getProperty("domain.http");
+ assumeNotNull(httpDom);
+ URL u = new URL("http://" + httpDom + "/cacert-" + token + ".txt");
return IOUtils.readURL(new InputStreamReader(u.openStream())).trim();
}
package org.cacert.gigi.ping;
import static org.junit.Assert.*;
+import static org.junit.Assume.*;
import java.io.IOException;
import java.net.Socket;
private void testEmailAndSSL(int sslVariant, int emailVariant, boolean successMail) throws IOException, InterruptedException, SQLException, GeneralSecurityException, GigiApiException {
String test = getTestProps().getProperty("domain.local");
-
+ assumeNotNull(test);
URL u = new URL("https://" + getServerName() + DomainOverview.PATH);
initailizeDomainForm(u);
package org.cacert.gigi.testUtils;
import static org.junit.Assert.*;
+import static org.junit.Assume.*;
import java.io.IOException;
import java.net.HttpURLConnection;
protected static void updateService(String token, String value, String action) throws IOException, MalformedURLException {
String manage = getTestProps().getProperty("domain.manage");
+ assumeNotNull(manage);
String url = manage + "t1=" + token + "&t2=" + value + "&action=" + action;
assertEquals(200, ((HttpURLConnection) new URL(url).openConnection()).getResponseCode());
}