From cc77c4233dfb5364d80a07550a63a394a3263984 Mon Sep 17 00:00:00 2001 From: Rob Hanlon Date: Fri, 7 Aug 2020 11:22:45 -0700 Subject: [PATCH] Switch from bat-test to kaocha (#22) --- .circleci/config.yml | 2 +- project.clj | 14 ++++++++++---- src/clj_test_containers/core.clj | 4 ++-- tests.edn | 5 +++++ 4 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 tests.edn diff --git a/.circleci/config.yml b/.circleci/config.yml index fdd2b0d..c81dc6c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,7 +36,7 @@ jobs: key: v1-dependencies-{{ checksum "project.clj" }} # run tests! - - run: lein bat-test cloverage + - run: lein test - store_test_results: path: target diff --git a/project.clj b/project.clj index 2c7048e..c68693a 100644 --- a/project.clj +++ b/project.clj @@ -1,14 +1,20 @@ (defproject clj-test-containers "0.2.0-SNAPSHOT" :description "A lightweight, unofficial wrapper around the Testcontainers Java library" + :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 - :output-to "target/junit.xml"}]} - :profiles {:dev {:dependencies [[org.testcontainers/postgresql "1.14.3"]]}} + + :aliases {"test" ["run" "-m" "kaocha.runner"]} + + :profiles {:dev {:dependencies [[org.testcontainers/postgresql "1.14.3"] + [lambdaisland/kaocha-cloverage "1.0-45"] + [lambdaisland/kaocha "1.0.641"] + [lambdaisland/kaocha-junit-xml "0.0.76"]]}} + :target-path "target/%s") diff --git a/src/clj_test_containers/core.clj b/src/clj_test_containers/core.clj index 640a28d..9c0a5a6 100644 --- a/src/clj_test_containers/core.clj +++ b/src/clj_test_containers/core.clj @@ -1,10 +1,10 @@ (ns clj-test-containers.core - (:require [clojure.java.io :as io]) + (:require [clojure.spec.alpha :as s]) (:import [org.testcontainers.containers GenericContainer] [org.testcontainers.utility MountableFile] [org.testcontainers.containers BindMode Network] [org.testcontainers.images.builder ImageFromDockerfile] - [java.nio.file Path Paths])) + [java.nio.file Paths])) (defn- resolve-bind-mode [bind-mode] diff --git a/tests.edn b/tests.edn new file mode 100644 index 0000000..e2e964b --- /dev/null +++ b/tests.edn @@ -0,0 +1,5 @@ +#kaocha/v1 +{:plugins [:kaocha.plugin/junit-xml + :kaocha.plugin/cloverage + :kaocha.plugin.alpha/spec-test-check] + :kaocha.plugin.junit-xml/target-file "target/junit.xml"}