diff --git a/README.md b/README.md index e884ff0..0ad5d06 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# clj-test-containers +# testcontainers-clj [![Clojars Project](http://clojars.org/clj-test-containers/latest-version.svg)](http://clojars.org/clj-test-containers) @@ -11,17 +11,13 @@ This library is a lightweight wrapper around the [Testcontainers Java library](h This library does not provide tools to include testcontainers in your testing lifecycle. As there are many different test tools with different approaches to testing in the clojure world, handling the lifecycle is up to you. -## Integration with test runners - -There is an [experimental kaocha plugin](https://github.com/lambdaschmiede/kaocha-testcontainers-plugin) you can try out - ## Usage The library provides a set of functions to interact with the testcontainers. A simple example, how to create a container with a Docker label, could look like this: ```clojure -(require '[clj-test-containers.core :as tc]) +(require '[testcontainers-clj.core :as tc]) (def container (-> (tc/create {:image-name "postgres:12.1" :exposed-ports [5432] @@ -41,7 +37,7 @@ If you'd rather create a container from a Dockerfile in your project, it could l ```clojure -(require '[clj-test-containers.core :as tc]) +(require '[testcontainers-clj.core :as tc]) (def container (-> (tc/create-from-docker-file {:env-vars {"FOO" "bar"} :exposed-ports [80] @@ -52,7 +48,7 @@ If you'd rather create a container from a Dockerfile in your project, it could l If you prefer to use prebuilt containers from the Testcontainers project, you can do it like this ```clojure -(require '[clj-test-containers.core :as tc]) +(require '[testcontainers-clj.core :as tc]) (:import [org.testcontainers.containers PostgreSQLContainer]) (def container (-> (tc/init {:container (PostgreSQLContainer. "postgres:12.2") diff --git a/doc/tutorial.md b/doc/tutorial.md index 2910ff6..d92d079 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -15,7 +15,7 @@ The functions accept and return a map structure, which enables us to operate the consistent way. The example shown with Java Interop above would look like this, when using the wrapped functions: ```clojure -(require '[clj-test-containers.core :as tc]) +(require '[testcontainers-clj.core :as tc]) (deftest db-integration-test (testing "A simple PostgreSQL integration test" diff --git a/src/clj_test_containers/core.clj b/src/testcontainers_clj/core.clj similarity index 99% rename from src/clj_test_containers/core.clj rename to src/testcontainers_clj/core.clj index b43cc12..cbb2343 100644 --- a/src/clj_test_containers/core.clj +++ b/src/testcontainers_clj/core.clj @@ -1,6 +1,6 @@ -(ns clj-test-containers.core +(ns testcontainers-clj.core (:require - [clj-test-containers.spec.core :as cs] + [testcontainers-clj.spec.core :as cs] [clojure.spec.alpha :as s] [clojure.string]) (:import diff --git a/src/clj_test_containers/spec/container.clj b/src/testcontainers_clj/spec/container.clj similarity index 95% rename from src/clj_test_containers/spec/container.clj rename to src/testcontainers_clj/spec/container.clj index 5712ba1..1fab7b8 100644 --- a/src/clj_test_containers/spec/container.clj +++ b/src/testcontainers_clj/spec/container.clj @@ -1,4 +1,4 @@ -(ns clj-test-containers.spec.container +(ns testcontainers-clj.spec.container (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen]) diff --git a/src/clj_test_containers/spec/core.clj b/src/testcontainers_clj/spec/core.clj similarity index 91% rename from src/clj_test_containers/spec/core.clj rename to src/testcontainers_clj/spec/core.clj index c2d7c53..45b47fa 100644 --- a/src/clj_test_containers/spec/core.clj +++ b/src/testcontainers_clj/spec/core.clj @@ -1,7 +1,7 @@ -(ns clj-test-containers.spec.core +(ns testcontainers-clj.spec.core (:require - [clj-test-containers.spec.container :as csc] - [clj-test-containers.spec.network :as csn] + [testcontainers-clj.spec.container :as csc] + [testcontainers-clj.spec.network :as csn] [clojure.spec.alpha :as s])) (s/def ::wait-for diff --git a/src/clj_test_containers/spec/network.clj b/src/testcontainers_clj/spec/network.clj similarity index 90% rename from src/clj_test_containers/spec/network.clj rename to src/testcontainers_clj/spec/network.clj index 8cb4bb2..42715b1 100644 --- a/src/clj_test_containers/spec/network.clj +++ b/src/testcontainers_clj/spec/network.clj @@ -1,4 +1,4 @@ -(ns clj-test-containers.spec.network +(ns testcontainers-clj.spec.network (:require [clojure.spec.alpha :as s]) (:import diff --git a/test/clj_test_containers/core_test.clj b/test/testcontainers_clj/core_test.clj similarity index 99% rename from test/clj_test_containers/core_test.clj rename to test/testcontainers_clj/core_test.clj index ec80794..1aaa877 100644 --- a/test/clj_test_containers/core_test.clj +++ b/test/testcontainers_clj/core_test.clj @@ -1,6 +1,6 @@ -(ns clj-test-containers.core-test +(ns testcontainers-clj.core-test (:require - [clj-test-containers.core :as sut] + [testcontainers-clj.core :as sut] [clojure.string :refer [includes?]] [clojure.test :refer [deftest is testing]]) (:import