diff options
author | cyberta <cyberta@riseup.net> | 2020-01-21 16:10:59 -0600 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2020-01-21 16:10:59 -0600 |
commit | 6a015d337d6a786adb319c3f9de7b9b7e9ae80bb (patch) | |
tree | ae19d8d28d15d3b871d82e804994d810f79ad811 /app/src/sharedTest | |
parent | 14b84f691e369e2a4ef3fe8687688f5ba98fa719 (diff) |
implement no-dns fallback using okhttp's Dns interface
Diffstat (limited to 'app/src/sharedTest')
-rw-r--r-- | app/src/sharedTest/java/se.leap.bitmaskclient/testutils/TestSetupHelper.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/src/sharedTest/java/se.leap.bitmaskclient/testutils/TestSetupHelper.java b/app/src/sharedTest/java/se.leap.bitmaskclient/testutils/TestSetupHelper.java index 669abc84..89833393 100644 --- a/app/src/sharedTest/java/se.leap.bitmaskclient/testutils/TestSetupHelper.java +++ b/app/src/sharedTest/java/se.leap.bitmaskclient/testutils/TestSetupHelper.java @@ -51,12 +51,15 @@ public class TestSetupHelper { public static Provider getConfiguredProvider() throws IOException, JSONException { - return getProvider(null, null, null, null); + return getProvider(null, null, null, null, null); } - public static Provider getProvider(String domain, String caCertFile, String providerJson, String eipServiceJson) { + public static Provider getProvider(String domain, String providerIp, String caCertFile, String providerJson, String eipServiceJson) { if (domain == null) domain = "https://riseup.net"; + if (providerIp == null) { + providerIp = ""; + } if (caCertFile == null) caCertFile = "riseup.net.pem"; if (providerJson == null) @@ -68,6 +71,7 @@ public class TestSetupHelper { try { Provider p = new Provider( new URL(domain), + providerIp, getInputAsString(TestSetupHelper.class.getClassLoader().getResourceAsStream(caCertFile)), getInputAsString(TestSetupHelper.class.getClassLoader().getResourceAsStream(providerJson)) |