X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2Fping%2FTestHTTP.java;h=4daa0d7e9421e5a4b672c0b966e1a1fb534d0601;hp=64c9cd650e3e618d7c51cd194f3b70158554e7b1;hb=28675b61ff01735e091fb37fd0d150574f2f61b6;hpb=a1a980dd0cc65f33a6189eb81a164fe79abb647c diff --git a/tests/org/cacert/gigi/ping/TestHTTP.java b/tests/org/cacert/gigi/ping/TestHTTP.java index 64c9cd65..4daa0d7e 100644 --- a/tests/org/cacert/gigi/ping/TestHTTP.java +++ b/tests/org/cacert/gigi/ping/TestHTTP.java @@ -23,6 +23,7 @@ import org.cacert.gigi.testUtils.IOUtils; import org.cacert.gigi.testUtils.PingTest; import org.cacert.gigi.testUtils.TestEmailReciever.TestMail; import org.cacert.gigi.util.RandomToken; +import org.junit.Assert; import org.junit.Test; public class TestHTTP extends PingTest { @@ -73,8 +74,8 @@ public class TestHTTP extends PingTest { TestMail mail = getMailReciever().recieve(); if (emailVariant == 0) { - String link = mail.extractLink(); - new URL(link).openConnection().getHeaderField(""); + Assert.assertNotNull(mail); + mail.verify(); } waitForPings(2); @@ -106,7 +107,7 @@ public class TestHTTP extends PingTest { 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(); + return IOUtils.readURL(new InputStreamReader(u.openStream(), "UTF-8")).trim(); } }