Add lein-cljfmt plugin
This commit is contained in:
parent
dc05e3b19f
commit
d351993c7e
2 changed files with 11 additions and 12 deletions
|
|
@ -3,11 +3,10 @@
|
||||||
:url "https://github.com/javahippie/clj-test-containers"
|
:url "https://github.com/javahippie/clj-test-containers"
|
||||||
:license {:name "Eclipse Public License"
|
:license {:name "Eclipse Public License"
|
||||||
:url "http://www.eclipse.org/legal/epl-v10.html"}
|
:url "http://www.eclipse.org/legal/epl-v10.html"}
|
||||||
|
|
||||||
:dependencies [[org.clojure/clojure "1.10.1"]
|
:dependencies [[org.clojure/clojure "1.10.1"]
|
||||||
[org.testcontainers/testcontainers "1.14.3"]]
|
[org.testcontainers/testcontainers "1.14.3"]]
|
||||||
:plugins [[metosin/bat-test "0.4.4"]]
|
:plugins [[metosin/bat-test "0.4.4"]
|
||||||
:bat-test {:report [:pretty {:type :junit
|
[lein-cljfmt "0.6.7"]]
|
||||||
|
:bat-test {:report [:pretty {:type :junit
|
||||||
:output-to "target/junit.xml"}]}
|
:output-to "target/junit.xml"}]}
|
||||||
:target-path "target/%s")
|
:target-path "target/%s")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
(deftest init-test
|
(deftest init-test
|
||||||
(testing "Testing basic testcontainer generic image initialisation"
|
(testing "Testing basic testcontainer generic image initialisation"
|
||||||
(let [container (create {:image-name "postgres:12.2"
|
(let [container (create {:image-name "postgres:12.2"
|
||||||
:exposed-ports [5432]
|
:exposed-ports [5432]
|
||||||
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
||||||
initialized-container (start! container)
|
initialized-container (start! container)
|
||||||
stopped-container (stop! container)]
|
stopped-container (stop! container)]
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
(testing "Executing a command in the running Docker container"
|
(testing "Executing a command in the running Docker container"
|
||||||
(let [container (create {:image-name "postgres:12.2"
|
(let [container (create {:image-name "postgres:12.2"
|
||||||
:exposed-ports [5432]
|
:exposed-ports [5432]
|
||||||
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
||||||
initialized-container (start! container)
|
initialized-container (start! container)
|
||||||
result (execute-command! initialized-container ["whoami"])
|
result (execute-command! initialized-container ["whoami"])
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
(testing "Testing mapping of a classpath resource"
|
(testing "Testing mapping of a classpath resource"
|
||||||
(let [container (-> (create {:image-name "postgres:12.2"
|
(let [container (-> (create {:image-name "postgres:12.2"
|
||||||
:exposed-ports [5432]
|
:exposed-ports [5432]
|
||||||
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
||||||
(map-classpath-resource! {:resource-path "test.sql"
|
(map-classpath-resource! {:resource-path "test.sql"
|
||||||
:container-path "/opt/test.sql"
|
:container-path "/opt/test.sql"
|
||||||
|
|
@ -48,11 +48,11 @@
|
||||||
|
|
||||||
(testing "Testing mapping of a filesystem-binding"
|
(testing "Testing mapping of a filesystem-binding"
|
||||||
(let [container (-> (create {:image-name "postgres:12.2"
|
(let [container (-> (create {:image-name "postgres:12.2"
|
||||||
:exposed-ports [5432]
|
:exposed-ports [5432]
|
||||||
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
||||||
(bind-filesystem! {:host-path "."
|
(bind-filesystem! {:host-path "."
|
||||||
:container-path "/opt"
|
:container-path "/opt"
|
||||||
:mode :read-only}))
|
:mode :read-only}))
|
||||||
initialized-container (start! container)
|
initialized-container (start! container)
|
||||||
file-check (execute-command! initialized-container ["tail" "/opt/README.md"])
|
file-check (execute-command! initialized-container ["tail" "/opt/README.md"])
|
||||||
stopped-container (stop! container)]
|
stopped-container (stop! container)]
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
(testing "Copying a file from the host into the container"
|
(testing "Copying a file from the host into the container"
|
||||||
(let [container (-> (create {:image-name "postgres:12.2"
|
(let [container (-> (create {:image-name "postgres:12.2"
|
||||||
:exposed-ports [5432]
|
:exposed-ports [5432]
|
||||||
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
||||||
(copy-file-to-container! {:path "test.sql"
|
(copy-file-to-container! {:path "test.sql"
|
||||||
:container-path "/opt/test.sql"
|
:container-path "/opt/test.sql"
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
|
|
||||||
(testing "Copying a file from the classpath into the container"
|
(testing "Copying a file from the classpath into the container"
|
||||||
(let [container (-> (create {:image-name "postgres:12.2"
|
(let [container (-> (create {:image-name "postgres:12.2"
|
||||||
:exposed-ports [5432]
|
:exposed-ports [5432]
|
||||||
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
:env-vars {"POSTGRES_PASSWORD" "pw"}})
|
||||||
(copy-file-to-container! {:path "test.sql"
|
(copy-file-to-container! {:path "test.sql"
|
||||||
:container-path "/opt/test.sql"
|
:container-path "/opt/test.sql"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue