 
       (let [[report] (int/pql-query pdb "reports { certname = 'my_agent' and noop = false }")
             metrics (get-href pdb (get-in report [:metrics :href]))
-            logs  (get-href pdb (get-in report [:logs :href]))]
+            logs  (get-href pdb (get-in report [:logs :href]))
+            ;; In Puppet 7, disable_i18n is true by default, so the "Retrieving locales"
+            ;; log message does not exist
+            info-log-count (if (->> (int/bundle-exec {} "puppet" "--version")
+                                    :out
+                                    trim-newline
+                                    (re-matches #"^6.*"))
+                             6
+                             5)]
 
         (is (= #{{:name "total", :value 1, :category "events"}
                  {:name "changed", :value 1, :category "resources"}

(ns puppetlabs.puppetdb.integration.reports
  (:require [clojure.test :refer :all]
            [me.raynes.fs :as fs]
            [puppetlabs.puppetdb.integration.fixtures :as int]
            [puppetlabs.puppetdb.testutils.services :as svc-utils]

                  (filter #(= "notice" (:level %))
                          logs))))

        (is (= info-log-count
               (count
                 (filter #(= "info" (:level %))
                         logs))))))))

(defn read-gc-count-metric []
  ;; metrics are global, so...
