If you need to test wildcard subdomains in a CI environment there are a few options available to you.
A simple one is to use the free service at http://lvh.me that resolves itself along with all subdomains to
localhost. Using this you can set tests to run at something like http://example.lvh.me and you’re done.
Another option is to install and use dnsmasq. You can add an entry like:
# Wildcard DNS entries address=/.test/127.0.0.1
That would mean dnsmasq will return A records for all domains ending in .test pointing them at localhost:
$ dig +noall +answer example.test example.test. 0 IN A 127.0.0.1 $dig +noall +answer foo.example.test foo.example.test. 0 IN A 127.0.0.1