   (:import
    [java.net URI]
    [java.nio.file Files]
-   [java.nio.file.attribute PosixFilePermission PosixFilePermissions]))
+   [java.nio.file.attribute PosixFilePermissions]))
 
 (defn pg-dump
   "Returns the content of pg as a string via pg_dump or nil on failure."

      (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
  (with-open [pg (int/setup-postgres)
              pdb (int/run-puppetdb pg {})
              ps (int/run-puppet-server-as "my_puppetserver" [pdb] {})]


      ;; Now change the parameter to be a secret, and make sure it's redacted
      (int/run-puppet-as "my_agent" ps pdb
        (format "notify {'hi':  message => Sensitive('%s')}"
          secret))
      (let [[notify & other-bits] (filter #(= ["Notify" "hi"] [(:type %) (:title %)])
                                    (int/pql-query pdb "resources {}"))]
        (is (empty? other-bits))
        (is (= {} (:parameters notify))))
      (is (not (str/includes? (pg-dump pg) secret))))))
