(ns clojars.unit.certs-test
  (:require [clojure.test :refer [deftest is]]))

(def sixty-days (* 86400 1000 60))

(deftest fail-when-gpg-key-is-about-to-expire
  (let [expire-date #inst "2021-12-25T00:00:00.000-00:00"]
    (is (< (System/currentTimeMillis)
          (- (.getTime expire-date) sixty-days))
      (format "Security GPG key expires on %s" expire-date))))

(deftest fail-when-tls-cert-is-about-to-expire
  (let [expire-date #inst "2020-06-17T00:00:00.000-00:00"]
    (is (< (System/currentTimeMillis)
          (- (.getTime expire-date) sixty-days))
      (format "clojars.org TLS cert expires on %s.\nBe sure to give lein a copy of the new one: %s"
        expire-date "https://github.com/technomancy/leiningen/blob/master/leiningen-core/resources/clojars.pem"))))

(ns clojars.unit.certs-test
  (:require [clojure.test :refer [deftest is]]))

(def sixty-days (* 86400 1000 60))

(deftest fail-when-gpg-key-is-about-to-expire
  (let [expire-date #inst "2021-12-25T00:00:00.000-00:00"]
    (is (< (System/currentTimeMillis)
          (- (.getTime expire-date) sixty-days))
      (format "Security GPG key expires on %s" expire-date))))

Remove unneeded TLS cert expiration test
Remove unneeded TLS cert expiration test

The certs are now managed automatically by AWS.

tobias/clojars-web,clojars/clojars-web,tobias/clojars-web,ato/clojars-web,ato/clojars-web,clojars/clojars-web,clojars/clojars-web,tobias/clojars-web