 
 (use-fixtures :once with-no-jvm-shutdown-hooks)
 
-(def test-resources-config-dir "./test-resources/config/jetty/")
+(def test-resources-dir        "./test-resources/")
+(def test-resources-config-dir (str test-resources-dir "config/jetty/"))
 
 (def default-keystore-pass     "Kq8lG9LkISky9cDIYysiadxRx")
 

         (finally
           (shutdown))))))

(defservice hello-test-service
  [[:WebserverService add-war-handler]]
  (init [this context]
        (add-war-handler "test-resources/helloWorld.war" "/test")
        context)
  (stop [this context]
        context))

(deftest jetty-jetty9-service
  (testing "ring request over http succeeds")
    (bootstrap-and-validate-ring-handler
      "http://localhost:8080"

          (shutdown)))))

  (testing "WAR support"
    (let [app             (bootstrap-services-with-cli-data [jetty9-service]
                            {:config
                              (str
                                test-resources-config-dir
                                "jetty-plaintext-http.ini")})
          s               (get-service app :WebserverService)
          add-war-handler (partial add-war-handler s)
          shutdown        (partial stop s (service-context s))
          path            "/test"
          war             "helloWorld.war"]
      (try
        (add-war-handler (str test-resources-dir war) path)
        (let [response (http-client/get (str "http://localhost:8080" path "/hello"))]
          (is (= (:status response) 200))
          (is (= (:body response)
                 "<html>\n<head><title>Hello World Servlet</title></head>\n<body>Hello World!!</body>\n</html>\n")))
        (finally
          (shutdown)))))

  (testing "webserver bootstrap throws IllegalArgumentException when neither
            port nor ssl-port specified in the config"
