                      munge-example-report-for-storage
                      (dissoc :producer_timestamp :metrics :logs :noop)
                      utils/underscore->dash-keys)
-      current-time (now)]
+      recent-time (-> 1 seconds ago)]
   (deftest store-v4-report
     (let [command {:command (command-names :store-report)
                    :version 4

        (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? current-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`.

                 :payload (get-in wire-catalogs [4 :empty])}
        certname (get-in command [:payload :name])
        cmd-producer-timestamp (get-in command [:payload :producer-timestamp])
        recent-time (-> 1 seconds ago)]
    (with-fixtures
      (test-msg-handler command publish discard-dir
        (is (false? (contains? (:payload command) :producer-timestamp)))
