Cleanup, ensure Clojure types instead of Java types
This commit is contained in:
parent
d9e9b9724d
commit
92386aa9cf
1 changed files with 7 additions and 7 deletions
|
|
@ -16,22 +16,22 @@
|
|||
[{:keys [container exposed-ports env-vars command]}]
|
||||
(.setExposedPorts container (map int exposed-ports))
|
||||
|
||||
(when (some? env-vars)
|
||||
(doseq [pair env-vars]
|
||||
(.addEnv container (first pair) (second pair))))
|
||||
(run! (fn [[k v]] (.addEnv container k v)) env-vars)
|
||||
|
||||
(when (some? command)
|
||||
(when command
|
||||
(.setCommand container command))
|
||||
|
||||
{:container container
|
||||
:exposed-ports (.getExposedPorts container)
|
||||
:env-vars (.getEnvMap container)
|
||||
:exposed-ports (vec (.getExposedPorts container))
|
||||
:env-vars (into {} (.getEnvMap container))
|
||||
:host (.getHost container)})
|
||||
|
||||
(defn create
|
||||
"Creates a generic testcontainer and sets its properties"
|
||||
[{:keys [image-name] :as options}]
|
||||
(init (assoc options :container (GenericContainer. image-name))))
|
||||
(->> (GenericContainer. image-name)
|
||||
(assoc options :container)
|
||||
init))
|
||||
|
||||
(defn map-classpath-resource!
|
||||
"Maps a resource in the classpath to the given container path. Should be called before starting the container!"
|
||||
|
|
|
|||
Loading…
Reference in a new issue