#4139 Replace existing domain names and non-private IP addresses in tests
Closed: Fixed None Opened 10 years ago by pspacek.

I have noticed that FreeIPA's test suite uses non-private IP addresses and domain names in tests. As a result, tests attempt to contact those public addresses so the traffic goes out to the public Internet and spams legitimate uses of those addresses.

E.g. tests ipatests/test_xmlrpc/test_dns_plugin.py try to contact IP 1.2.3.4:

zone 15.142.80.in-addr.arpa/IN: notify to 1.2.3.4#53 failed: timed out
zone 15.142.80.in-addr.arpa/IN: notify to 1.2.3.4#53: retries exceeded

We should be good citizens and do not spam innocent.

Another side effect is that some tests can depend on data on public Internet.


Additional notes:

test_dns[42]: dnsrecord_add: Add CNAME record to u'testcnamerec' using dnsrecord_add ...

results in DNS query for foo-1.example.com. (non-existent at the moment). This name is also referenced by

test_dns[67]: dnsrecord_add: Add PTR record u'80' to u'15.142.80.in-addr.arpa.' using dnsrecord_add ... 
80.15.142.80.in-addr.arpa. 86400 IN        PTR     foo-1.example.com.

IP address 1.2.3.4 is used as A record ns1.dnszone.test. (referenced from various NS records).

IP address 80.142.15.80 is used as forwarder:

test_dns[69]: dnsconfig_mod: Update global DNS settings ... 
global configuration 'cn=dns,dc=ipa,dc=example': adding forwarder '80.142.15.80#53'

We should also fix the DNS plugin's docstring.

I'm playing with DNS tests for bind-dyndb-ldap 4.0 so I will do this & test it together. (But in separate patches, of course! :-))

master:

  • 3aa9a8b Use private IPv4 addresses for tests
  • 558be8e Rename variables in test xmlrpc/dns_plugin
  • df3fa94 Use reserved domain names for tests

Metadata Update from @pspacek:
- Issue assigned to pspacek
- Issue set to the milestone: FreeIPA 4.0 - 2014/02

7 years ago

Login to comment on this ticket.

Metadata