-
Notifications
You must be signed in to change notification settings - Fork 13
/
core.clj
54 lines (47 loc) · 1.52 KB
/
core.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(ns clj-test-containers.spec.core
(:require
[clj-test-containers.spec.container :as csc]
[clj-test-containers.spec.network :as csn]
[clojure.spec.alpha :as s]))
(s/def ::wait-for
(s/keys :req-un [::csc/wait-strategy]
:opt-un [::csc/path
::csc/message
::csc/check]))
(s/def ::log-to
(s/keys :req-un [::csc/log-strategy]
:opt-un [::csc/string]))
(s/def ::network
(s/nilable (s/keys :req-un [::csn/network
::csn/name
::csn/ipv6
::csn/driver])))
(s/def ::container
(s/keys :req-un [::csc/container
::csc/exposed-ports
::csc/env-vars
::csc/host]
:opt-un [::network
::wait-for
::log-to]))
(s/def ::init-options
(s/keys :req-un [::csc/container]
:opt-un [::csc/exposed-ports
::csc/env-vars
::csc/command
::network
::wait-for
::log-to
::csc/network-aliases]))
(s/def ::create-options
(s/keys :req-un [::csc/image-name]
:opt-un [::csc/exposed-ports
::csc/env-vars
::csc/command
::network
::wait-for
::log-to
::csc/network-aliases]))
(s/def ::create-network-options
(s/keys :opt-un [::csn/ipv6
::csn/driver]))