         (is (= status 403) "Unauthentic requests are denied with allow-unauthenticated false"))))
   (testing "With a minimal config of an empty list of rules"
     (let [app (build-ring-handler [])
-          req (request "/path/to/foo" :get "127.0.0.1" test-domain-cert)
+          req (testutils/request "/path/to/foo" :get "127.0.0.1" testutils/test-domain-cert)
           {:keys [status body]} (app req)]
       (is (= status 403))
       (is (= body "global deny all - no rules matched"))))

          [plumbing-service authorization-service]
          (assoc-in minimal-config [:authorization :rules] rules-w-exts)
          (testing "allowed request via extensions"
            (let [req (request "/puppet/v4/catalog" :get "127.0.0.1" allowable-cert)]
              (is (-> (get-service app :PlumbingService)
                      (call-authorization-check req {:oid-map oid-map})
                      rules/authorized?))))
          (testing "denied request via extensions"
            (let [req (request "/puppet/v4/catalog" :get "127.0.0.1" deniable-cert)]
              (is (not (-> (get-service app :PlumbingService)
                           (call-authorization-check req {:oid-map oid-map})
                           rules/authorized?)))))

    [puppetlabs.ssl-utils.core :as ssl-utils]
    [puppetlabs.trapperkeeper.app :refer [get-service]]
    [puppetlabs.trapperkeeper.authorization.rules :as rules]
    [puppetlabs.trapperkeeper.authorization.testutils :as testutils]
    [puppetlabs.trapperkeeper.services :refer [defservice]]
    [puppetlabs.trapperkeeper.services.authorization.authorization-service
     :refer [authorization-service]]
