diff --git a/lib/unit_tests_utils/internal_dns.rb b/lib/unit_tests_utils/internal_dns.rb index d3267de..c2e2df2 100644 --- a/lib/unit_tests_utils/internal_dns.rb +++ b/lib/unit_tests_utils/internal_dns.rb @@ -6,7 +6,11 @@ def self.resolv(hostname) end def self.resolve_domain_name(hostname) - `dig +short #{hostname} @#{nameserver_ip}`.strip.split("\n") + if self.valid_ips?([hostname]) + return [hostname] + end + + return `dig +short #{hostname} @#{nameserver_ip}`.strip.split("\n") end def self.host_addresses(hostnames, port) diff --git a/unit_tests_utils.gemspec b/unit_tests_utils.gemspec index ff34bc4..9a2a20c 100644 --- a/unit_tests_utils.gemspec +++ b/unit_tests_utils.gemspec @@ -2,8 +2,8 @@ Gem::Specification.new do |s| s.name = 'unit-tests-utils' - s.version = '1.4.0' - s.date = '2018-04-25' + s.version = '1.4.1' + s.date = '2018-10-05' s.summary = 'Common unit tests utils' s.description = 'This gems includes all resources needed for the a9s BOSH release unit tests.' s.authors = ['Michael Lieser', 'Dennis Groß', 'Lucas Pinto']