Simplify these assertions a bit

This commit is contained in:
Michael Klishin 2019-10-08 09:41:31 -05:00
parent 7b1bf6c734
commit 99e9b0b2b6
1 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ defmodule CoreListenersTest do
validity = X509.Certificate.Validity.days_from_now(validityInDays)
ca_key = X509.PrivateKey.new_ec(:secp256r1)
ca = X509.Certificate.self_signed(ca_key,
"/C=US/ST=CA/L=San Francisco/O=Acme/CN=ECDSA Root CA",
"/C=US/ST=CA/L=San Francisco/O=Megacorp/CN=Megacorp Intermediate CA",
template: :root_ca,
validity: validity
)
@ -67,7 +67,7 @@ defmodule CoreListenersTest do
port: 61613,
opts: opts)
assert listener_expiring_within(listener, 86400 * (validityInDays - 5)) == false
assert listener_expiring_within(listener, 86400 * (validityInDays + 5)) != false
assert not listener_expiring_within(listener, 86400 * (validityInDays - 5))
assert listener_expiring_within(listener, 86400 * (validityInDays + 5))
end
end