]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/testUtils/ManagedTest.java
Test login with email verification.
[gigi.git] / tests / org / cacert / gigi / testUtils / ManagedTest.java
index f591e77259e0f6a1a6d9fd3cf576f0f92469fa45..c9a44b8a158046c778ac6291f53faee948e078d9 100644 (file)
@@ -19,6 +19,7 @@ import java.util.Properties;
 
 import org.cacert.gigi.DevelLauncher;
 import org.cacert.gigi.IOUtils;
+import org.cacert.gigi.InitTruststore;
 import org.cacert.gigi.testUtils.TestEmailReciever.TestMail;
 import org.junit.After;
 import org.junit.AfterClass;
@@ -35,6 +36,11 @@ public class ManagedTest {
                return url;
        }
        static Properties testProps = new Properties();
+       static {
+               InitTruststore.run();
+               HttpURLConnection.setFollowRedirects(false);
+       }
+
        @BeforeClass
        public static void connectToServer() {
                try {
@@ -171,7 +177,8 @@ public class ManagedTest {
                        TestMail tm = ter.recieve();
                        String verifyLink = tm.extractLink();
                        String[] parts = verifyLink.split("\\?");
-                       URL u = new URL("https://" + getServerName() + "/verify" + parts[1]);
+                       URL u = new URL("https://" + getServerName() + "/verify?"
+                                       + parts[1]);
                        u.openStream().close();;
                } catch (InterruptedException e) {
                        throw new Error(e);