Don't blindly succeed even when you fail

- must use a non-zero exit code to signify failure to Concourse
This commit is contained in:
Brian Cunnie
2016-09-02 13:07:42 -07:00
parent 6cb6eaa17f
commit 45d0e58679

View File

@@ -16,6 +16,8 @@ def get_whois_nameservers(domain)
nameservers
end
exit_code=0 # assume successful exit
check_domain(domain)
puts "[PASS] #{domain} basic check ('DOMAIN' variable set & not empty)"
@@ -30,6 +32,9 @@ whois_nameservers.each do |whois_nameserver|
puts "[PASS] #{whois_nameserver}'s NS records match whois"
else
puts "[FAIL] #{whois_nameserver}'s NS records do NOT match whois: #{dig_nameservers.join(", ")}"
exit_code=5
end
#p "#{whois_nameserver}: #{nameservers}"
end
exit(exit_code)