Skip to content

Commit 6999de1

Browse files
bwbroersmamxsasha
authored andcommitted
Fixes #1833 - Use private IPv4 address space in tests
grep -rlF '172.43.0.' | xargs sed -r -i 's/172\.43\.0\./172.16.43./g;Te;s@/16@/24@;:e'
1 parent ae9bc4d commit 6999de1

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

docker/batch-test.env

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ IPV6_SUBNET_PUBLIC=fd00:43:1::/48
2121
IPV6_GATEWAY_PUBLIC=fd00:43:1::1
2222
IPV6_IP_PUBLIC=fd00:43:1::100
2323
# use internal IPv4 subnet and IP's
24-
IPV4_SUBNET_PUBLIC=172.43.0.0/16
25-
IPV4_IP_PUBLIC=172.43.0.100
26-
IPV4_WEBSERVER_IP_PUBLIC=172.43.0.100
27-
IPV4_UNBOUND_IP_PUBLIC=172.43.0.101
24+
IPV4_SUBNET_PUBLIC=172.16.43.0/24
25+
IPV4_IP_PUBLIC=172.16.43.100
26+
IPV4_WEBSERVER_IP_PUBLIC=172.16.43.100
27+
IPV4_UNBOUND_IP_PUBLIC=172.16.43.101
2828
IPV6_UNBOUND_IP_PUBLIC=fd00:43:1::101
2929

3030
# use fixed IPv4 addresses for internal networking to prevent resolving cache issues when recreating containers
3131
IPV4_SUBNET_INTERNAL=192.168.43.0/24
3232

33-
IPV4_IP_MOCK_RESOLVER_PUBLIC=172.43.0.114
33+
IPV4_IP_MOCK_RESOLVER_PUBLIC=172.16.43.114
3434
IPV6_IP_MOCK_RESOLVER_PUBLIC=fd00:43:1::114
3535

36-
IPV4_IP_TEST_TARGET_PUBLIC=172.43.0.51
37-
IPV4_IP_TEST_TARGET_MAIL_PUBLIC=172.43.0.52
36+
IPV4_IP_TEST_TARGET_PUBLIC=172.16.43.51
37+
IPV4_IP_TEST_TARGET_MAIL_PUBLIC=172.16.43.52
3838
IPV6_IP_TEST_TARGET_PUBLIC=fd00:43:1::51
3939
IPV6_IP_TEST_TARGET_MAIL_PUBLIC=fd00:43:1::52
4040

docker/integration-tests/mock-resolver/bad-ipv6-ns.test.zone

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
NS bad-ns1
1212
NS bad-ns2
1313

14-
good-ns1 A 172.43.0.114
14+
good-ns1 A 172.16.43.114
1515
good-ns1 AAAA fd00:43:1::114
1616
bad-ns1 AAAA fd00:90::1
1717
bad-ns2 AAAA fd00:90::2
1818

1919
; IPV4_IP_TEST_TARGET_PUBLIC
20-
* A 172.43.0.51
20+
* A 172.16.43.51
2121
AAAA fd00:43:1::51

docker/integration-tests/mock-resolver/test.zone

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
; configure DNS for the internet.nl application instance that is running in test
44
; IPV4_WEBSERVER_IP_PUBLIC
5-
internet A 172.43.0.100
5+
internet A 172.16.43.100
66
; IPV6_IP_PUBLIC
77
AAAA fd00:43:1::100
88
; all it's subdomains
@@ -30,7 +30,7 @@ conn.www.ipv6.internet CNAME ipv6.internet
3030
; nameserver setup for the connection test
3131
test-ns-signed.internet NS ns.test-ns-signed.internet
3232
; IPV4_UNBOUND_IP_PUBLIC
33-
ns.test-ns-signed.internet A 172.43.0.101
33+
ns.test-ns-signed.internet A 172.16.43.101
3434
; IPV6_UNBOUND_IP_PUBLIC
3535
AAAA fd00:43:1::101
3636

@@ -44,15 +44,15 @@ platforminternet CNAME internet
4444
; configure DNS for targets that are tested by the internet.test instance
4545
; normal 100% website test target
4646
; IPV4_IP_TEST_TARGET_PUBLIC
47-
target A 172.43.0.51
47+
target A 172.16.43.51
4848
; IPV6_IP_TEST_TARGET_PUBLIC
4949
AAAA fd00:43:1::51
5050
*.target CNAME target
5151

5252
; normal 100% email test target
5353
*.mail-target MX 10 mx.mail-target.test.
5454
; IPV4_IP_TEST_TARGET_MAIL_PUBLIC
55-
mx.mail-target A 172.43.0.52
55+
mx.mail-target A 172.16.43.52
5656
; IPV6_IP_TEST_TARGET_MAIL_PUBLIC
5757
AAAA fd00:43:1::52
5858

@@ -62,7 +62,7 @@ bad-ipv6-ns NS good-ns1.bad-ipv6-ns
6262
NS bad-ns2.bad-ipv6-ns
6363
NS bad-ns3.bad-ipv6-ns
6464
; IPV4_IP_MOCK_RESOLVER_PUBLIC
65-
good-ns1.bad-ipv6-ns A 172.43.0.114
65+
good-ns1.bad-ipv6-ns A 172.16.43.114
6666
; IPV6_IP_MOCK_RESOLVER_PUBLIC
6767
good-ns1.bad-ipv6-ns AAAA fd00:43:1::114
6868
bad-ns2.bad-ipv6-ns AAAA fd00:90::1

docker/test.env

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ IPV6_SUBNET_PUBLIC=fd00:43:1::/48
2020
IPV6_GATEWAY_PUBLIC=fd00:43:1::1
2121
IPV6_IP_PUBLIC=fd00:43:1::100
2222
# use internal IPv4 subnet and IP's
23-
IPV4_SUBNET_PUBLIC=172.43.0.0/16
24-
IPV4_IP_PUBLIC=172.43.0.100
25-
IPV4_WEBSERVER_IP_PUBLIC=172.43.0.100
26-
IPV4_UNBOUND_IP_PUBLIC=172.43.0.101
23+
IPV4_SUBNET_PUBLIC=172.16.43.0/24
24+
IPV4_IP_PUBLIC=172.16.43.100
25+
IPV4_WEBSERVER_IP_PUBLIC=172.16.43.100
26+
IPV4_UNBOUND_IP_PUBLIC=172.16.43.101
2727
IPV6_UNBOUND_IP_PUBLIC=fd00:43:1::101
2828

2929
# use fixed IPv4 addresses for internal networking to prevent resolving cache issues when recreating containers
3030
IPV4_SUBNET_INTERNAL=192.168.43.0/24
3131

32-
IPV4_IP_MOCK_RESOLVER_PUBLIC=172.43.0.114
32+
IPV4_IP_MOCK_RESOLVER_PUBLIC=172.16.43.114
3333
IPV6_IP_MOCK_RESOLVER_PUBLIC=fd00:43:1::114
3434

35-
IPV4_IP_TEST_TARGET_PUBLIC=172.43.0.51
36-
IPV4_IP_TEST_TARGET_MAIL_PUBLIC=172.43.0.52
35+
IPV4_IP_TEST_TARGET_PUBLIC=172.16.43.51
36+
IPV4_IP_TEST_TARGET_MAIL_PUBLIC=172.16.43.52
3737
IPV6_IP_TEST_TARGET_PUBLIC=fd00:43:1::51
3838
IPV6_IP_TEST_TARGET_MAIL_PUBLIC=fd00:43:1::52
3939

documentation/Docker-integration-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Test are run by the `test-runner` which spawns as a container inside the isolate
1818

1919
### Internal resolver
2020

21-
All IP addresses used in the isolated network are in private address ranges (`172.43.0.0/24`, `fd00:43:1::/64`) and all domain names use the `.test` domain. The internal `resolver` runs dnsmasq to provide routing of the internal domain and stub records for external services (eg: Cymru origin ASN query). The resolver configuration file is `docker/integration-tests/dnsmasq/entrypoint.sh`.
21+
All IP addresses used in the isolated network are in private address ranges (`172.16.43.0/24`, `fd00:43:1::/64`) and all domain names use the `.test` domain. The internal `resolver` runs dnsmasq to provide routing of the internal domain and stub records for external services (eg: Cymru origin ASN query). The resolver configuration file is `docker/integration-tests/dnsmasq/entrypoint.sh`.
2222

2323
During integration test runs the environment variable `INTEGRATION_TESTS` is set to `True` which makes the application's Unbound resolver use the internal resolver, and allows resolving of the `.test` TLD.
2424

integration_tests/batch/results.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@
6161
"nameservers": {},
6262
"webservers": {
6363
"ipv4": {
64-
"addresses": [{"address": "172.43.0.51", "reachable": True, "routing": []}],
64+
"addresses": [{"address": "172.16.43.51", "reachable": True, "routing": []}],
6565
"https_enabled": True,
6666
"server_reachable": True,
67-
"tested_address": "172.43.0.51",
67+
"tested_address": "172.16.43.51",
6868
"details": {
6969
"dane_status": "none",
7070
"dane_records": [],

0 commit comments

Comments
 (0)