       (finally
         (Files/deleteIfExists pgpass)))))
 
-;;
-;; Disabling this due to issues with the Jenkins test
-;; instances. PDB-3461 covers the infrastructure related change needed
-;; to fix this test. This should be uncommented once that is complete.
-;;
-#_(deftest ^:integration sensitive-parameter-redaction
+(deftest ^:integration sensitive-parameter-redaction
   (with-open [pg (int/setup-postgres)
               pdb (int/run-puppetdb pg {})
               ps (int/run-puppet-server-as "my_puppetserver" [pdb] {})]


      ;; Create an initial parameter, and make sure it's visible
      (int/run-puppet-as "my_agent" ps pdb
                         (format "notify {'hi':  message => '%s'}"
                                 not-secret))
      (let [notifications (filter #(and (= ["Notify" "hi"]
                                           [(:type %) (:title %)]))
                                  (int/pql-query pdb "resources {}"))
            [notify] notifications]
        (is (= 1 (count notifications)))
        (is (= {:message not-secret} (:parameters notify))))

  (:import
   [java.net URI]
   [java.nio.file Files]
   [java.nio.file.attribute PosixFilePermissions]))

(defn pg-dump
  "Returns the content of pg as a string via pg_dump or nil on failure."
