- Process p = updateDNS(token, value);
- String reRead = new String(IOUtils.readURL(p.getInputStream()));
- reRead = reRead.trim();
- reRead = reRead.substring(1, reRead.length() - 1);
- assertEquals(value, reRead);
+ updateService(token, value, "dns");
+ assertEquals(value, readDNS(token));
+
+ }
+
+ @Test
+ public void emailAndDNSSuccess() throws IOException, InterruptedException, SQLException, NamingException {
+ testEmailAndDNS(0, 0, true, true);
+ }
+
+ @Test
+ public void dnsFail() throws IOException, InterruptedException, SQLException, NamingException {
+ testEmailAndDNS(1, 0, false, true);
+ }
+
+ @Test
+ public void dnsContentFail() throws IOException, InterruptedException, SQLException, NamingException {
+ testEmailAndDNS(2, 0, false, true);
+ }