Skip to content

Commit c0faeab

Browse files
mariusSincovicidfetti
authored andcommitted
Fix meshnet tests using IPv6
Signed-off-by: Marius Sincovici <[email protected]>
1 parent ca0b216 commit c0faeab

File tree

7 files changed

+21
-345
lines changed

7 files changed

+21
-345
lines changed

config/manager_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ func TestConfigDefaultValues(t *testing.T) {
159159
assert.False(t, cfg.Mesh)
160160
assert.False(t, cfg.KillSwitch)
161161
assert.Equal(t, test.autoconnect, cfg.AutoConnect)
162-
assert.False(t, cfg.IPv6)
163162
assert.True(t, cfg.VirtualLocation.Get())
164163
})
165164
}

test/qa/lib/__init__.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,12 @@
6363
("nordwhisper", "", ""),
6464
]
6565

66-
# no obfuscated servers with ipv6 2021/05/24
67-
TECHNOLOGIES_WITH_IPV6 = STANDARD_TECHNOLOGIES[:-1]
68-
6966
# Used for test parametrization, when the same test has to be run for different threat protection lite settings.
7067
THREAT_PROTECTION_LITE = [
7168
"on",
7269
"off",
7370
]
7471

75-
IPV6 = [
76-
"on",
77-
"off",
78-
]
79-
8072
# Used for test parametrization, when the same test has to be run for obfuscated technologies.
8173
STANDARD_GROUPS = [
8274
"Africa_The_Middle_East_And_India",
@@ -136,14 +128,6 @@
136128
"Paris",
137129
]
138130

139-
# Used for testing, when specific server is offine.
140-
#
141-
# curl api.nordvpn.com/v1/servers\?limit=6000 -L | jq '[.[] | select((.ips | length) > 1)] | map(.hostname |= rtrimstr(".nordvpn.com")) | map(.hostname)'
142-
IPV6_SERVERS = [
143-
"us9591", "us9592"
144-
]
145-
146-
147131
EXPECTED_CONSENT_MESSAGE = """
148132
We value your privacy.
149133
@@ -276,13 +260,6 @@ def set_dns(dns):
276260
print("WARNING:", ex)
277261

278262

279-
def set_ipv6(ipv6):
280-
try:
281-
print(sh.nordvpn.set.ipv6(ipv6))
282-
except sh.ErrorReturnCode_1 as ex:
283-
print("WARNING:", ex)
284-
285-
286263
def set_firewall(firewall):
287264
try:
288265
print(sh.nordvpn.set.firewall(firewall))

test/qa/lib/firewall.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ def _get_rules_allowlist_subnet_and_port_on(interface: str, subnets: list[str],
289289
return result
290290

291291

292-
# TODO: Add missing IPv6 rules (icmp6 & dhcp6)
293292
def _get_firewall_rules(ports: list[Port] | None = None, subnets: list[str] | None = None) -> list[str]:
294293
# Default route interface
295294
interface = sh.ip.route.show("default").split(None)[4]

test/qa/test_combinations.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,30 @@
77
info,
88
logging,
99
login,
10+
network
1011
)
1112
from test_connect import disconnect_base_test, get_alias
12-
from test_connect6 import connect_base_test
1313

14+
def connect_base_test(group: str = (), name: str = "", hostname: str = "", ipv6 = True):
15+
"""
16+
Connects to a NordVPN server and performs a series of checks to ensure the connection is successful.
17+
18+
Parameters
19+
----------
20+
group (str): The specific server name or group name to connect to. Default is an empty string.
21+
name (str): Used to verify the connection message. Default is an empty string.
22+
hostname (str): Used to verify the connection message. Default is an empty string.
23+
ipv6 (bool): If True, checks if IPv6 connection is available. Default is True.
24+
"""
25+
26+
output = sh.nordvpn.connect(group, _tty_out=False)
27+
print(output)
28+
29+
assert lib.is_connect_successful(output, name, hostname)
30+
assert network.is_connected()
31+
32+
if ipv6:
33+
assert network.is_ipv6_connected()
1434

1535
def setup_function(function): # noqa: ARG001
1636
daemon.start()

test/qa/test_connect6.py

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)