diff options
author | elijah <elijah@riseup.net> | 2016-02-24 13:08:19 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-02-24 13:08:19 -0800 |
commit | 25204787dfa9fd3486a9244de56d92fe3d5bfb99 (patch) | |
tree | 112cb4c388dc7969b15ea353225bff9a156212ca /tests/white-box/network.rb | |
parent | 393d46feb9890a87c5764f40b61c51d03fe0a4fe (diff) |
fix time comparison bug in network test
Diffstat (limited to 'tests/white-box/network.rb')
-rw-r--r-- | tests/white-box/network.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/white-box/network.rb b/tests/white-box/network.rb index 2436230b..436fc8a8 100644 --- a/tests/white-box/network.rb +++ b/tests/white-box/network.rb @@ -77,9 +77,9 @@ class Network < LeapTest cert_paths.each do |cert_path| if File.exists?(cert_path) cert = OpenSSL::X509::Certificate.new(File.read(cert_path)) - if cert.not_after > Time.now + if Time.now > cert.not_after fail "The certificate #{cert_path} expired on #{cert.not_after}" - elsif cert.not_after > Time.now + THIRTY_DAYS + elsif Time.now + THIRTY_DAYS > cert.not_after fail "The certificate #{cert_path} will expire soon, on #{cert.not_after}" end end |