Prepare Release 0.3.0
This commit is contained in:
parent
94975f68f0
commit
193482c1b8
4 changed files with 120 additions and 110 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -1,10 +1,19 @@
|
|||
# Change Log
|
||||
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
||||
|
||||
## [0.3.0] - Upcoming
|
||||
## [0.4.0] - Upcoming
|
||||
|
||||
## [0.3.0] - 2020-10-23
|
||||
### Added
|
||||
- [#25](https://github.com/javahippie/clj-test-containers/issues/25): Add support for a container wait stategy
|
||||
- [#35](https://github.com/javahippie/clj-test-containers/issues/35): Add support for docker version 2.4.0 - upgrading testcontainers-java version
|
||||
- [#27](https://github.com/javahippie/clj-test-containers/issues/27): Add support for accessing container logs
|
||||
- [#38](https://github.com/javahippie/clj-test-containers/pull/38): Add type hints to silence reflection warnings
|
||||
- [#33](https://github.com/javahippie/clj-test-containers/pull/33): Add more options to the HTTP wait strategy
|
||||
- [#28](https://github.com/javahippie/clj-test-containers/pull/28): Link to the java lib
|
||||
- [#23](https://github.com/javahippie/clj-test-containers/pull/23): Configure clojure.spec, spec out a few functions
|
||||
- [#24](https://github.com/javahippie/clj-test-containers/pull/24): cljstyle redux, with pre-commit hook
|
||||
- [#21](https://github.com/javahippie/clj-test-containers/pull/21): Install and configure cljstyle
|
||||
|
||||
### Changed
|
||||
- [#29](https://github.com/javahippie/clj-test-containers/issues/29): init-network should be called create-network!
|
||||
|
|
|
|||
24
README.md
24
README.md
|
|
@ -71,6 +71,7 @@ Creates a testcontainers instance from a given Docker label and returns them
|
|||
| `:network` | Map | A map containing the configuration of a Docker Network (see: `create-network`) |
|
||||
| `:network-aliases` | Map | A list of alias names for the container on the network |
|
||||
| `:wait-for` | Map | A map containing the wait strategy to use and the condition to check for |
|
||||
| `:log-to` | Map | A map containing the log strategy to use, e.g. {:log-strategy string} |
|
||||
|
||||
#### Result:
|
||||
|
||||
|
|
@ -81,7 +82,7 @@ Creates a testcontainers instance from a given Docker label and returns them
|
|||
| `:env-vars` | Map | Value of the same input parameter |
|
||||
| `:host` | String | The host for the Docker Container |
|
||||
| `:network` | Map | The network configuration of the Container, if provided |
|
||||
| `:wait-for` | Map | The wait-for configuration of the Container, if provided!
|
||||
| `:wait-for` | Map | The wait-for configuration of the Container, if provided! |
|
||||
|
||||
#### Example:
|
||||
|
||||
|
|
@ -124,6 +125,8 @@ Initializes a given Testcontainer, which was e.g. provided by a library
|
|||
| `:network` | Map | A map containing the configuration of a Docker Network (see: `create-network`) |
|
||||
| `:network-aliases` | Map | A list of alias names for the container on the network |
|
||||
| `:wait-for` | Map | A map containing the wait strategy to use and the condition to check for |
|
||||
| `:log-to` | Map | A map containing the log strategy to use, e.g. {:log-strategy string} |
|
||||
| | | |
|
||||
#### Result:
|
||||
|
||||
| Key | Type | Description |
|
||||
|
|
@ -133,7 +136,7 @@ Initializes a given Testcontainer, which was e.g. provided by a library
|
|||
| `:env-vars` | Map | Value of the same input parameter |
|
||||
| `:host` | String | The host for the Docker Container |
|
||||
| `:network` | Map | The network configuration of the Container, if provided |
|
||||
| `:wait-for` | Map | The wait-for configuration of the Container, if provided!
|
||||
| `:wait-for` | Map | The wait-for configuration of the Container, if provided! |
|
||||
|
||||
#### Example:
|
||||
|
||||
|
|
@ -174,6 +177,8 @@ Creates a testcontainer from a Dockerfile
|
|||
| `:network` | Map | A map containing the configuration of a Docker Network (see: `create-network`) |
|
||||
| `:network-aliases` | Map | A list of alias names for the container on the network |
|
||||
| `:wait-for` | Map | A map containing the wait strategy to use and the condition to check for |
|
||||
| `:log-to` | Map | A map containing the log strategy to use, e.g. {:log-strategy string} |
|
||||
| | | |
|
||||
#### Result:
|
||||
|
||||
| Key | Type | Description |
|
||||
|
|
@ -183,7 +188,7 @@ Creates a testcontainer from a Dockerfile
|
|||
| `:env-vars` | Map | Value of the same input parameter |
|
||||
| `:host` | String | The host for the Docker Container |
|
||||
| `:network` | Map | The network configuration of the Container, if provided |
|
||||
| `:wait-for` | Map | The wait-for configuration of the Container, if provided!
|
||||
| `:wait-for` | Map | The wait-for configuration of the Container, if provided! |
|
||||
|
||||
#### Example:
|
||||
|
||||
|
|
@ -207,6 +212,7 @@ Starts the Testcontainer, which was defined by `create`
|
|||
| ------------- | :------------- | :----- |
|
||||
| First parameter: | | |
|
||||
| `container-config` | Map, mandatory | Return value of the `create` function |
|
||||
| | | |
|
||||
|
||||
#### Result:
|
||||
| Key | Type | Description |
|
||||
|
|
@ -381,7 +387,7 @@ Creates a network. The optional map accepts config values for enabling ipv6 and
|
|||
| Key | Type | Description |
|
||||
| ------------- | :------------- | :----- |
|
||||
| `:ipv6` | boolean | Should the network enable IPv6? |
|
||||
| `:driver`| String | The network driver used by Docker, e.g. `bridge` or `host`
|
||||
| `:driver` | String | The network driver used by Docker, e.g. `bridge` or `host` |
|
||||
|
||||
|
||||
|
||||
|
|
@ -404,9 +410,13 @@ Creates a network. The optional map accepts config values for enabling ipv6 and
|
|||
(create-network)
|
||||
```
|
||||
|
||||
### dump-logs
|
||||
Call on a started container.
|
||||
Provided logging was enabled for a container, returns the given log presentation, e.g. as a string
|
||||
|
||||
| Key | Type | Description |
|
||||
| `container-config` | Map, mandatory | The configuration describing the container for which the log should be retrieved |
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2020 Tim Zöller
|
||||
|
||||
Distributed under the Eclipse Public License either version 1.0 or (at
|
||||
your option) any later version.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
(defproject clj-test-containers "0.3.0-SNAPSHOT"
|
||||
(defproject clj-test-containers "0.3.0"
|
||||
:description "A lightweight, unofficial wrapper around the Testcontainers Java library"
|
||||
|
||||
:url "https://github.com/javahippie/clj-test-containers"
|
||||
|
|
|
|||
|
|
@ -27,15 +27,6 @@
|
|||
(Thread/sleep 500)
|
||||
(is (includes? (sut/dump-logs initialized-container) "database system is ready to accept connections"))))
|
||||
|
||||
(comment
|
||||
(def cnt (sut/create {:image-name "postgres:12.2"
|
||||
:exposed-ports [5432]
|
||||
:env-vars {"POSTGRES_PASSWORD" "pw"}
|
||||
:wait-for {:wait-strategy :log :message "accept connections"}
|
||||
:log-to {:log-strategy :string}}))
|
||||
(def cnt (sut/start! cnt))
|
||||
(sut/dump-logs cnt))
|
||||
|
||||
(testing "Testing basic testcontainer generic image initialisation with wait for log message"
|
||||
(let [container (sut/create {:image-name "postgres:12.2"
|
||||
:exposed-ports [5432]
|
||||
|
|
|
|||
Loading…
Reference in a new issue