From a48c6c1c719247e4663d946e4ee56bfada98b5e6 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sun, 14 Nov 2021 18:27:48 +0100 Subject: allow ipv6 only openvpn gateways --- .../java/se/leap/bitmaskclient/eip/VpnConfigGeneratorTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/src/test/java/se') diff --git a/app/src/test/java/se/leap/bitmaskclient/eip/VpnConfigGeneratorTest.java b/app/src/test/java/se/leap/bitmaskclient/eip/VpnConfigGeneratorTest.java index ad6f5d7b..2f2266cb 100644 --- a/app/src/test/java/se/leap/bitmaskclient/eip/VpnConfigGeneratorTest.java +++ b/app/src/test/java/se/leap/bitmaskclient/eip/VpnConfigGeneratorTest.java @@ -1140,5 +1140,14 @@ public class VpnConfigGeneratorTest { assertTrue(vpnProfiles.get(OPENVPN).getConfigFile(context, false).trim().equals(expectedVPNConfig_v4_ovpn_udp_tcp.trim())); } + @Test + public void testGenerateVpnProfile_v3_ipv6only_allowOpenvpnIPv6Only() throws Exception { + gateway = new JSONObject(TestSetupHelper.getInputAsString(getClass().getClassLoader().getResourceAsStream("ptdemo_misconfigured_ipv6.json"))).getJSONArray("gateways").getJSONObject(0); + generalConfig = new JSONObject(TestSetupHelper.getInputAsString(getClass().getClassLoader().getResourceAsStream("ptdemo_misconfigured_ipv6.json"))).getJSONObject(OPENVPN_CONFIGURATION); + vpnConfigGenerator = new VpnConfigGenerator(generalConfig, secrets, gateway, 3); + HashMap vpnProfiles = vpnConfigGenerator.generateVpnProfiles(); + assertTrue(vpnProfiles.containsKey(OPENVPN)); + } + } \ No newline at end of file -- cgit v1.2.3