|
5 | 5 | [puppetlabs.http.client.sync :as sync] |
6 | 6 | [puppetlabs.http.client.test-common :refer :all] |
7 | 7 | [puppetlabs.trapperkeeper.core :as tk] |
8 | | - [puppetlabs.trapperkeeper.services.webserver.jetty9-service :as jetty9] |
| 8 | + [puppetlabs.trapperkeeper.services.webserver.jetty10-service :as jetty10] |
9 | 9 | [puppetlabs.trapperkeeper.testutils.bootstrap :as testutils] |
10 | 10 | [puppetlabs.trapperkeeper.testutils.logging :as testlogging] |
11 | 11 | [puppetlabs.trapperkeeper.testutils.webserver :as testwebserver] |
|
58 | 58 | (testing (format "sync client: HTTP method: '%s'" http-method) |
59 | 59 | (testlogging/with-test-logging |
60 | 60 | (testutils/with-app-with-config app |
61 | | - [jetty9/jetty9-service test-web-service] |
| 61 | + [jetty10/jetty10-service test-web-service] |
62 | 62 | {:webserver {:port 10000}} |
63 | 63 | (testing "java sync client" |
64 | 64 | (let [request-options (SimpleRequestOptions. (URI. "http://localhost:10000/hello/")) |
|
75 | 75 | (deftest sync-client-head-test |
76 | 76 | (testlogging/with-test-logging |
77 | 77 | (testutils/with-app-with-config app |
78 | | - [jetty9/jetty9-service test-web-service] |
| 78 | + [jetty10/jetty10-service test-web-service] |
79 | 79 | {:webserver {:port 10000}} |
80 | 80 | (testing "java sync client" |
81 | 81 | (let [request-options (SimpleRequestOptions. (URI. "http://localhost:10000/hello/")) |
|
115 | 115 | (deftest sync-client-persistent-test |
116 | 116 | (testlogging/with-test-logging |
117 | 117 | (testutils/with-app-with-config app |
118 | | - [jetty9/jetty9-service test-web-service] |
| 118 | + [jetty10/jetty10-service test-web-service] |
119 | 119 | {:webserver {:port 10000}} |
120 | 120 | (testing "persistent java client" |
121 | 121 | (let [request-options (RequestOptions. "http://localhost:10000/hello/") |
|
209 | 209 | (deftest sync-client-as-test |
210 | 210 | (testlogging/with-test-logging |
211 | 211 | (testutils/with-app-with-config app |
212 | | - [jetty9/jetty9-service test-web-service] |
| 212 | + [jetty10/jetty10-service test-web-service] |
213 | 213 | {:webserver {:port 10000}} |
214 | 214 | (testing "java sync client: :as unspecified" |
215 | 215 | (let [request-options (SimpleRequestOptions. (URI. "http://localhost:10000/hello/")) |
|
250 | 250 | (deftest request-with-client-test |
251 | 251 | (testlogging/with-test-logging |
252 | 252 | (testutils/with-app-with-config app |
253 | | - [jetty9/jetty9-service test-web-service] |
| 253 | + [jetty10/jetty10-service test-web-service] |
254 | 254 | {:webserver {:port 10000}} |
255 | 255 | (let [client (HttpAsyncClients/createDefault) |
256 | 256 | opts {:method :get :url "http://localhost:10000/hello/"}] |
|
268 | 268 | (deftest java-api-cookie-test |
269 | 269 | (testlogging/with-test-logging |
270 | 270 | (testutils/with-app-with-config app |
271 | | - [jetty9/jetty9-service test-cookie-service] |
| 271 | + [jetty10/jetty10-service test-cookie-service] |
272 | 272 | {:webserver {:port 10000}} |
273 | 273 | (let [client (Sync/createClient (ClientOptions.))] |
274 | 274 | (testing "Set a cookie using Java API" |
|
282 | 282 | (deftest clj-api-cookie-test |
283 | 283 | (testlogging/with-test-logging |
284 | 284 | (testutils/with-app-with-config app |
285 | | - [jetty9/jetty9-service test-cookie-service] |
| 285 | + [jetty10/jetty10-service test-cookie-service] |
286 | 286 | {:webserver {:port 10000}} |
287 | 287 | (let [client (sync/create-client {})] |
288 | 288 | (testing "Set a cookie using Clojure API" |
|
308 | 308 | (deftest sync-client-request-headers-test |
309 | 309 | (testlogging/with-test-logging |
310 | 310 | (testutils/with-app-with-config header-app |
311 | | - [jetty9/jetty9-service test-header-web-service] |
| 311 | + [jetty10/jetty10-service test-header-web-service] |
312 | 312 | {:webserver {:port 10000}} |
313 | 313 | (testing "java sync client" |
314 | 314 | (let [request-options (-> (SimpleRequestOptions. (URI. "http://localhost:10000/hello/")) |
|
360 | 360 | (deftest sync-client-request-body-test |
361 | 361 | (testlogging/with-test-logging |
362 | 362 | (testutils/with-app-with-config req-body-app |
363 | | - [jetty9/jetty9-service test-body-web-service] |
| 363 | + [jetty10/jetty10-service test-body-web-service] |
364 | 364 | {:webserver {:port 10000}} |
365 | 365 | (testing "java sync client: string body for post request with explicit |
366 | 366 | content type and UTF-8 encoding uses UTF-8 encoding" |
|
448 | 448 | [desc opts accept-encoding content-encoding content-should-match?] |
449 | 449 | (testlogging/with-test-logging |
450 | 450 | (testutils/with-app-with-config req-body-app |
451 | | - [jetty9/jetty9-service test-compression-web-service] |
| 451 | + [jetty10/jetty10-service test-compression-web-service] |
452 | 452 | {:webserver {:port 10000}} |
453 | 453 | (testing (str "java sync client: compression headers / response: " desc) |
454 | 454 | (let [request-opts (cond-> (SimpleRequestOptions. (URI. "http://localhost:10000/hello/")) |
|
486 | 486 | (deftest query-params-test-sync |
487 | 487 | (testlogging/with-test-logging |
488 | 488 | (testutils/with-app-with-config app |
489 | | - [jetty9/jetty9-service test-params-web-service] |
| 489 | + [jetty10/jetty10-service test-params-web-service] |
490 | 490 | {:webserver {:port 8080}} |
491 | 491 | (testing "URL Query Parameters work with the Java client" |
492 | 492 | (let [request-options (SimpleRequestOptions. (URI. "http://localhost:8080/params?foo=bar&baz=lux")) |
|
506 | 506 | (deftest redirect-test-sync |
507 | 507 | (testlogging/with-test-logging |
508 | 508 | (testutils/with-app-with-config app |
509 | | - [jetty9/jetty9-service redirect-web-service] |
| 509 | + [jetty10/jetty10-service redirect-web-service] |
510 | 510 | {:webserver {:port 8080}} |
511 | 511 | (testing (str "redirects on POST not followed by Java client " |
512 | 512 | "when forceRedirects option not set to true") |
|
0 commit comments