summaryrefslogtreecommitdiff
path: root/app/src/androidTest/java/se/leap/bitmaskclient/test
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-06-08 19:56:43 +0200
committerParménides GV <parmegv@sdf.org>2015-06-08 20:04:03 +0200
commitb0a0805ab81aaa4e204ecfc77d3a6a7f7ed66b2f (patch)
tree7ebeb40d0c74a8c431b7845e403cb1add5e63be4 /app/src/androidTest/java/se/leap/bitmaskclient/test
parent8d39fbdb4980c95268249f21f3c6b8e36b22cf90 (diff)
s/buildtype/flavor, changed riseup's pin
Riseup's EE certificate expired (EE = End-Entity, the commercial certificate signed by the issuer), and we weren't able to fetch provider.json because the pin wasn't valid. This problem needs to be avoided in the future, using HKPK (https://tools.ietf.org/html/rfc7469), which Micah's implementing on Riseup. Switching from build types from flavors enables us to run tests against production apk, not just debug. I didn't detect this pinning problem because tests were run only against the debug apk, which trusted preseeded providers by default (thus bypassing pinning issue).
Diffstat (limited to 'app/src/androidTest/java/se/leap/bitmaskclient/test')
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java2
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java29
2 files changed, 23 insertions, 8 deletions
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java
index a664c885..f7ab4b1e 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java
@@ -16,7 +16,7 @@ public class ConnectionManager {
try {
method.invoke(conman, enabled);
} catch (InvocationTargetException | IllegalAccessException e) {
- e.printStackTrace();
+ //e.printStackTrace();
}
}
}
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java
index 106d5cf2..d23be601 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java
@@ -54,13 +54,28 @@ public class testVpnFragment extends BaseTestDashboard {
}
public void testVpnEveryProvider() {
- String[] providers = {"demo.bitmask.net", "riseup.net", "calyx.net"};
- for(String provider : providers) {
- changeProviderAndLogIn(provider);
- vpn_controller.sleepSeconds(1);
- vpn_controller.turnVpnOndAndOff(provider);
- vpn_controller.sleepSeconds(1);
- }
+ testDemoBitmaskNet();
+ testRiseupNet();
+ testCalyxNet();
+ }
+
+ private void testDemoBitmaskNet() {
+ testProvider("demo.bitmask.net");
+ }
+
+ private void testRiseupNet() {
+ testProvider("riseup.net");
+ }
+
+ private void testCalyxNet() {
+ testProvider("calyx.net");
+ }
+
+ private void testProvider(String provider) {
+ changeProviderAndLogIn(provider);
+ vpn_controller.sleepSeconds(1);
+ vpn_controller.turnVpnOndAndOff(provider);
+ vpn_controller.sleepSeconds(1);
}
public void testVpnIconIsDisplayed() {