summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2018-07-01 18:39:20 -0300
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2018-07-03 10:53:20 -0300
commit49fded98bf0bb0500021d2cec3c43abd36b38c3f (patch)
treefd46acaf0db8862c5110b74123eac933f2d84939
parent5d17110366adb7fa1e69c5b350e28523b0fb85d4 (diff)
downloadmullvadvpn-49fded98bf0bb0500021d2cec3c43abd36b38c3f.tar.xz
mullvadvpn-49fded98bf0bb0500021d2cec3c43abd36b38c3f.zip
Fix mock relay list used for testing
Remove trailing commas and use a real city that matches the default constraints, but with a mock relay.
-rw-r--r--mullvad-tests/src/lib.rs34
1 files changed, 19 insertions, 15 deletions
diff --git a/mullvad-tests/src/lib.rs b/mullvad-tests/src/lib.rs
index a9af2b9c10..afcdf7967d 100644
--- a/mullvad-tests/src/lib.rs
+++ b/mullvad-tests/src/lib.rs
@@ -117,21 +117,25 @@ fn prepare_relay_list<T: AsRef<Path>>(path: T) {
path,
r#"{
"countries": [{
- "name": "Mockland",
- "code": "fake",
- "latitude": -91,
- "longitude": 0,
- "relays": [{
- "hostname": "fake-mockland",
- "ipv4_addr_in": "192.168.0.100",
- "ipv4_addr_exit": "192.168.0.101",
- "include_in_country": true,
- "weight": 100,
- "tunnels": {
- "openvpn": [ { "port": 10000, "protocol": "udp" } ],
- "wireguard": [],
- },
- }],
+ "name": "Sweden",
+ "code": "se",
+ "cities": [{
+ "name": "Gothenburg",
+ "code": "got",
+ "latitude": 57.70887,
+ "longitude": 11.97456,
+ "relays": [{
+ "hostname": "fakehost",
+ "ipv4_addr_in": "192.168.0.100",
+ "ipv4_addr_exit": "192.168.0.101",
+ "include_in_country": true,
+ "weight": 100,
+ "tunnels": {
+ "openvpn": [ { "port": 1000, "protocol": "udp" } ],
+ "wireguard": []
+ }
+ }]
+ }]
}]
}"#,
).expect("Failed to create mock relay list file");