[Git][clojure-team/trapperkeeper-webserver-jetty9-clojure][debian/main] d/patches: add 0009 to disable tests that require networking.

Louis-Philippe Véronneau gitlab at salsa.debian.org
Mon Mar 1 00:20:37 GMT 2021



Louis-Philippe Véronneau pushed to branch debian/main at Debian Clojure Maintainers / trapperkeeper-webserver-jetty9-clojure


Commits:
9fe78ede by Louis-Philippe Véronneau at 2021-02-28T19:17:02-05:00
d/patches: add 0009 to disable tests that require networking.

(Closes: #983697)

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/0009_Testsuite_Requires_Network.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+trapperkeeper-webserver-jetty9-clojure (4.1.0-3) unstable; urgency=medium
+
+  * Team upload.
+  * d/patches: add 0009 to disable tests that require networking.
+    (Closes: #983697)
+
+ -- Louis-Philippe Véronneau <pollo at debian.org>  Sun, 28 Feb 2021 19:15:28 -0500
+
 trapperkeeper-webserver-jetty9-clojure (4.1.0-2) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/0009_Testsuite_Requires_Network.patch
=====================================
@@ -0,0 +1,155 @@
+These tests fail when the network is disabled. See #983738 and
+https://github.com/puppetlabs/trapperkeeper-webserver-jetty9/issues/224 for more
+details.
+Index: trapperkeeper-webserver-jetty9-clojure/test/clj/puppetlabs/trapperkeeper/services/webrouting/webrouting_service_handlers_test.clj
+===================================================================
+--- trapperkeeper-webserver-jetty9-clojure.orig/test/clj/puppetlabs/trapperkeeper/services/webrouting/webrouting_service_handlers_test.clj
++++ trapperkeeper-webserver-jetty9-clojure/test/clj/puppetlabs/trapperkeeper/services/webrouting/webrouting_service_handlers_test.clj
+@@ -152,43 +152,43 @@
+           (is (= (:status response) 200))
+           (is (= (:body response) body)))))))
+ 
+-(deftest war-test-web-routing
+-  (testing "WAR support with web routing"
+-    (with-app-with-config app
+-      [jetty9-service
+-       webrouting-service
+-       test-dummy]
+-      webrouting-plaintext-config
+-      (let [s               (get-service app :WebroutingService)
+-            add-war-handler (partial add-war-handler s)
+-            war             "helloWorld.war"
+-            svc             (get-service app :TestDummy)]
+-        (add-war-handler svc (str dev-resources-dir war))
+-        (let [response (http-get "http://localhost:8080/foo/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"))))))
+-
+-  (testing "WAR support with multiple web routes"
+-    (with-app-with-config app
+-      [jetty9-service
+-       webrouting-service
+-       test-dummy]
+-      webrouting-plaintext-multiroute-config
+-      (let [s               (get-service app :WebroutingService)
+-            add-war-handler (partial add-war-handler s)
+-            war             "helloWorld.war"
+-            svc             (get-service app :TestDummy)]
+-        (add-war-handler svc (str dev-resources-dir war) {:route-id :quux})
+-        (add-war-handler svc (str dev-resources-dir war) {:route-id :foo})
+-        (let [response (http-get "http://localhost:8080/foo/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")))
+-        (let [response (http-get "http://localhost:8080/bar/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")))))))
++;(deftest war-test-web-routing
++;  (testing "WAR support with web routing"
++;    (with-app-with-config app
++;      [jetty9-service
++;       webrouting-service
++;       test-dummy]
++;      webrouting-plaintext-config
++;      (let [s               (get-service app :WebroutingService)
++;            add-war-handler (partial add-war-handler s)
++;            war             "helloWorld.war"
++;            svc             (get-service app :TestDummy)]
++;        (add-war-handler svc (str dev-resources-dir war))
++;        (let [response (http-get "http://localhost:8080/foo/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"))))))
++;
++;  (testing "WAR support with multiple web routes"
++;    (with-app-with-config app
++;      [jetty9-service
++;       webrouting-service
++;       test-dummy]
++;      webrouting-plaintext-multiroute-config
++;      (let [s               (get-service app :WebroutingService)
++;            add-war-handler (partial add-war-handler s)
++;            war             "helloWorld.war"
++;            svc             (get-service app :TestDummy)]
++;        (add-war-handler svc (str dev-resources-dir war) {:route-id :quux})
++;        (add-war-handler svc (str dev-resources-dir war) {:route-id :foo})
++;        (let [response (http-get "http://localhost:8080/foo/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")))
++;        (let [response (http-get "http://localhost:8080/bar/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")))))))
+ 
+ (deftest endpoints-test-web-routing
+   (testing (str "get-registered-endpoints and log-registered-endpoints are "
+Index: trapperkeeper-webserver-jetty9-clojure/test/clj/puppetlabs/trapperkeeper/services/webserver/jetty9_service_handlers_test.clj
+===================================================================
+--- trapperkeeper-webserver-jetty9-clojure.orig/test/clj/puppetlabs/trapperkeeper/services/webserver/jetty9_service_handlers_test.clj
++++ trapperkeeper-webserver-jetty9-clojure/test/clj/puppetlabs/trapperkeeper/services/webserver/jetty9_service_handlers_test.clj
+@@ -235,34 +235,34 @@
+             handlers               {:on-connect (fn [ws] (ws-session/close! ws 4000 "Bye"))}]
+         (add-websocket-handler handlers path)))))
+ 
+-(deftest war-test
+-  (testing "WAR support"
+-    (with-app-with-config app
+-      [jetty9-service]
+-      jetty-plaintext-config
+-      (let [s               (get-service app :WebserverService)
+-            add-war-handler (partial add-war-handler s)
+-            path            "/test"
+-            war             "helloWorld.war"]
+-        (add-war-handler (str dev-resources-dir war) path)
+-        (let [response (http-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"))))))
+-
+-  (testing "WAR support with add-war-handler-to"
+-    (with-app-with-config app
+-      [jetty9-service]
+-      jetty-multiserver-plaintext-config
+-      (let [s                  (get-service app :WebserverService)
+-            add-war-handler    (partial add-war-handler s)
+-            path               "/test"
+-            war                "helloWorld.war"]
+-        (add-war-handler (str dev-resources-dir war) path {:server-id :foo})
+-        (let [response (http-get (str "http://localhost:8085" 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")))))))
++;(deftest war-test
++;  (testing "WAR support"
++;    (with-app-with-config app
++;      [jetty9-service]
++;      jetty-plaintext-config
++;      (let [s               (get-service app :WebserverService)
++;            add-war-handler (partial add-war-handler s)
++;            path            "/test"
++;            war             "helloWorld.war"]
++;        (add-war-handler (str dev-resources-dir war) path)
++;        (let [response (http-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"))))))
++;
++;  (testing "WAR support with add-war-handler-to"
++;    (with-app-with-config app
++;      [jetty9-service]
++;      jetty-multiserver-plaintext-config
++;      (let [s                  (get-service app :WebserverService)
++;            add-war-handler    (partial add-war-handler s)
++;            path               "/test"
++;            war                "helloWorld.war"]
++;        (add-war-handler (str dev-resources-dir war) path {:server-id :foo})
++;        (let [response (http-get (str "http://localhost:8085" 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")))))))
+ 
+ (deftest endpoints-test
+   (testing "Retrieve all endpoints"


=====================================
debian/patches/series
=====================================
@@ -3,3 +3,4 @@
 0006_Lein_Local.patch
 0007_No_Gniazdo.patch
 0008_Jetty_Post_Config_Failure.patch
+0009_Testsuite_Requires_Network.patch



View it on GitLab: https://salsa.debian.org/clojure-team/trapperkeeper-webserver-jetty9-clojure/-/commit/9fe78ede081313399439f315aafe182b8f75baef

-- 
View it on GitLab: https://salsa.debian.org/clojure-team/trapperkeeper-webserver-jetty9-clojure/-/commit/9fe78ede081313399439f315aafe182b8f75baef
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20210301/ec58afde/attachment.htm>


More information about the pkg-java-commits mailing list