From e57261ce12520290499dfc9721837aec01fa15fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Z=C3=B6ller?= Date: Wed, 25 May 2022 09:08:32 +0200 Subject: [PATCH] Added allow-insecure flag (#58) --- CHANGELOG.md | 11 +++++++++++ doc/wait-strategies.md | 1 + project.clj | 2 +- src/clj_test_containers/core.clj | 4 ++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62b798a..ddc203a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ # 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.8.0] - 2202-05-25 +### Added +- [#58](https://github.com/javahippie/clj-test-containers/issues/58): Add new `allowInsecure` flag to the HTTP wait strategy + +### Changed +- [#57](https://github.com/javahippie/clj-test-containers/issues/57): Upgrade to testcontainers-java 1.17.2 + +## [0.7.0] - 2022-04-23 +### Changed +- [#56](https://github.com/javahippie/clj-test-containers/issues/56): Update to Testcontainers 1.17.1 + ## [0.6.0] - 2022-03-26 ### Changed - [#55](https://github.com/javahippie/clj-test-containers/issues/55): Upgrade to latest Testcontainers version diff --git a/doc/wait-strategies.md b/doc/wait-strategies.md index 493b38b..3e2ad77 100644 --- a/doc/wait-strategies.md +++ b/doc/wait-strategies.md @@ -18,6 +18,7 @@ criteria is met. | method | String | The HTTP method to use (get, post, put...) | | status-codes | seq of int | The status codes which mark a successful request | | tls | boolean | Should TLS be used? | +| allow-insecure | boolean | Should insecure HTTP endpoints be trusted? | | read-timeout | long | The duration in seconds the HTTP may take | | basic-credentials | Map | {:username "User" :password "Password"} | | headers | Map | HTTP Headers, e.g. {"Accept" "application/json"} | diff --git a/project.clj b/project.clj index 0418cd5..aa8f23c 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject clj-test-containers "0.7.0" +(defproject clj-test-containers "0.7.1-SNAPSHOT" :description "A lightweight, unofficial wrapper around the Testcontainers Java library" :url "https://github.com/javahippie/clj-test-containers" diff --git a/src/clj_test_containers/core.clj b/src/clj_test_containers/core.clj index 535a7b0..2c9a935 100644 --- a/src/clj_test_containers/core.clj +++ b/src/clj_test_containers/core.clj @@ -102,6 +102,7 @@ method status-codes tls + allow-insecure read-timeout basic-credentials headers @@ -120,6 +121,9 @@ (when tls (.usingTls for-http)) + (when allow-insecure + (.allowInsecure for-http)) + (when read-timeout (.withReadTimeout for-http (Duration/ofSeconds read-timeout)))