                    :version 5
                    :payload (get-in wire-catalogs [5 :empty])}
           certname (get-in command [:payload :name])
-          cmd-producer-timestamp (get-in command [:payload :producer-timestamp])
-          current-time (now)]
+          cmd-producer-timestamp (get-in command [:payload :producer-timestamp])]
       (with-fixtures
         (test-msg-handler command publish discard-dir
 

                               :status)))

        ;;No producer_timestamp is included in v4, message received time (now) is used intead
        (is (t/before? current-time (-> (query-to-vec "SELECT producer_timestamp FROM reports")
                                        first
                                        :producer_timestamp
                                        to-date-time)))

        (is (empty? (fs/list-dir discard-dir)))
        ;;v4 does not include a producer_timestmap, the backend
        ;;should use the time the command was received instead
        (is (t/before? recent-time
                       (-> (query-to-vec "SELECT producer_timestamp FROM catalogs")
                           first
                           :producer_timestamp
                           to-date-time)))))))

(defn update-resource
  "Updated the resource in `catalog` with the given `type` and `title`.
