I wrote my own open source library code.
https://github.com/simkimsia/UtilityLib/
I have a function which attempts to get IP address by host.
https://github.com/simkimsia/UtilityLib/blob/master/Lib/HttpLib.php#L34
I wrote a test case for this.
https://github.com/simkimsia/UtilityLib/blob/master/Test/Case/Lib/HttpLibTest.php#L45
It passed in my localhost, but failed in Travis CI.
See https://travis-ci.org/simkimsia/UtilityLib/jobs/8874800
Basically it says nslookup not found.
How should I configure travis to allow me to use nslookup?
nslookup
is not installed by default on the VMs. You can install it by adding this to your .travis.yml
:
before_install:
- sudo apt-get -qq update
- sudo apt-get -qq install dnsutils