   (let [[expected-dataset expected-collection expected-records]
         (with-open [in (io/reader expected-changelog)] (parse-changelog in))
         filestore (config/filestore changelog-dir)
-        parsed-changelogs (doall (map (fn [log] (with-open [in (io/input-stream (fs/get-file filestore log))]
-                                                  (parse-changelog in))) changelogs))
+        parsed-changelogs (doall (map (fn [log] (with-open [in (io/input-stream (fs/get-file filestore log))
+                                                            zip (ZipInputStream. in)]
+                                                  (.getNextEntry zip)
+                                                  (parse-changelog zip))) changelogs))
         all-records (mapcat (fn [[_ _ records]] records) parsed-changelogs)]
     (is (every? #(= [expected-dataset expected-collection] %) (->> parsed-changelogs (map (partial take 2)))))
     (is (every? #(not (nil? %)) (->> all-records (filter #(#{:new :change :close} (:action %))) (map :feature))))

                          (= valid-from (nth %1 1))) extracts)
      (remove #(= version (nth % 0)) extracts))))

(defn- deleted-versions [extracts dataset collection extract-type records]
    (doseq [record records]
      (swap! extracts remove-extract-record record)))

(defn- query [table selector]
  (when (pg/table-exists? test-db "featured_regression_regression-set" table)

        [meta features] (json-reader/features-from-stream stream)]
    [meta features]))

(defn- inserted-features [extracts _ _ _ features]
  (let [new-extracts (map #(vector (:_version %) (:_valid_from %) (:_valid_to %) %) features)]
    (swap! extracts concat new-extracts)))

