diff --git a/project.clj b/project.clj index 0fad771..fa05701 100644 --- a/project.clj +++ b/project.clj @@ -3,11 +3,10 @@ :url "https://github.com/javahippie/clj-test-containers" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} - :dependencies [[org.clojure/clojure "1.10.1"] [org.testcontainers/testcontainers "1.14.3"]] - :plugins [[metosin/bat-test "0.4.4"]] - :bat-test {:report [:pretty {:type :junit + :plugins [[metosin/bat-test "0.4.4"] + [lein-cljfmt "0.6.7"]] + :bat-test {:report [:pretty {:type :junit :output-to "target/junit.xml"}]} :target-path "target/%s") - diff --git a/test/clj_test_containers/core_test.clj b/test/clj_test_containers/core_test.clj index 9e9de05..61956ed 100644 --- a/test/clj_test_containers/core_test.clj +++ b/test/clj_test_containers/core_test.clj @@ -5,7 +5,7 @@ (deftest init-test (testing "Testing basic testcontainer generic image initialisation" (let [container (create {:image-name "postgres:12.2" - :exposed-ports [5432] + :exposed-ports [5432] :env-vars {"POSTGRES_PASSWORD" "pw"}}) initialized-container (start! container) stopped-container (stop! container)] @@ -19,7 +19,7 @@ (testing "Executing a command in the running Docker container" (let [container (create {:image-name "postgres:12.2" - :exposed-ports [5432] + :exposed-ports [5432] :env-vars {"POSTGRES_PASSWORD" "pw"}}) initialized-container (start! container) result (execute-command! initialized-container ["whoami"]) @@ -31,7 +31,7 @@ (testing "Testing mapping of a classpath resource" (let [container (-> (create {:image-name "postgres:12.2" - :exposed-ports [5432] + :exposed-ports [5432] :env-vars {"POSTGRES_PASSWORD" "pw"}}) (map-classpath-resource! {:resource-path "test.sql" :container-path "/opt/test.sql" @@ -48,11 +48,11 @@ (testing "Testing mapping of a filesystem-binding" (let [container (-> (create {:image-name "postgres:12.2" - :exposed-ports [5432] + :exposed-ports [5432] :env-vars {"POSTGRES_PASSWORD" "pw"}}) (bind-filesystem! {:host-path "." - :container-path "/opt" - :mode :read-only})) + :container-path "/opt" + :mode :read-only})) initialized-container (start! container) file-check (execute-command! initialized-container ["tail" "/opt/README.md"]) stopped-container (stop! container)] @@ -65,7 +65,7 @@ (testing "Copying a file from the host into the container" (let [container (-> (create {:image-name "postgres:12.2" - :exposed-ports [5432] + :exposed-ports [5432] :env-vars {"POSTGRES_PASSWORD" "pw"}}) (copy-file-to-container! {:path "test.sql" :container-path "/opt/test.sql" @@ -82,7 +82,7 @@ (testing "Copying a file from the classpath into the container" (let [container (-> (create {:image-name "postgres:12.2" - :exposed-ports [5432] + :exposed-ports [5432] :env-vars {"POSTGRES_PASSWORD" "pw"}}) (copy-file-to-container! {:path "test.sql" :container-path "/opt/test.sql"