8
volumepath=$(jq -r ".store.volumePath" <<<"$output")
9
t POST libpod/volumes/create name=foo1 201 \
12
.Mountpoint=$volumepath/foo1/_data \
13
.CreatedAt~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.* \
17
t POST volumes/create 201 \
18
.Name~[0-9a-f]\\{64\\} \
20
.Mountpoint~$volumepath/[0-9a-f]\\{64\\}/_data \
21
.CreatedAt~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.* \
24
t POST libpod/volumes/create 201
25
t POST libpod/volumes/create \
27
Label='{"testlabel":"testonly"}' \
28
Options='{"type":"tmpfs","o":"nodev,noexec"}}' \
31
.Labels.testlabel=testonly \
33
.Options.o=nodev,noexec
34
t POST libpod/volumes/create \
36
Label='{"testlabel":""}' \
37
Options='{"type":"tmpfs","o":"nodev,noexec"}}' \
40
.Labels.testlabel="" \
42
.Options.o=nodev,noexec
43
t POST libpod/volumes/create \
45
Label='{"testlabel1":"testonly"}' \
46
Options='{"type":"tmpfs","o":"nodev,noexec"}}' \
49
.Labels.testlabel1=testonly \
51
.Options.o=nodev,noexec
55
t POST libpod/volumes/create name=foo1 500 \
56
.cause="volume already exists" \
61
t GET libpod/volumes/json 200 \
64
.[0].CreatedAt~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.*
65
t GET libpod/volumes/json?filters='{"name":["foo1"]}' 200 \
68
t GET libpod/volumes/json?filters='{"name":%20["foo1",%20"foo2"]}' 200 \
72
t GET libpod/volumes/json?filters='{"name":["nonexistent"]}' 200 length=0
73
t GET libpod/volumes/json?filters='{"label":["testlabel"]}' 200 length=2
74
t GET libpod/volumes/json?filters='{"label":["testlabel=testonly"]}' 200 length=1
75
t GET libpod/volumes/json?filters='{"label":["testlabel1=testonly"]}' 200 length=1
78
t GET libpod/volumes/foo1/json 200 \
80
.Mountpoint=$volumepath/foo1/_data \
81
.CreatedAt~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.*
82
t GET libpod/volumes/nonexistent/json 404 \
83
.cause="no such volume" \
88
t DELETE libpod/volumes/foo1 204
90
t GET libpod/volumes/foo1/json 404
92
t DELETE libpod/volumes/foo1 404 \
93
.cause="no such volume" \
98
t GET volumes?filters='garb1age}' 500 \
99
.cause="invalid character 'g' looking for beginning of value"
100
t GET volumes?filters='{"label":["testl' 500 \
101
.cause="unexpected end of JSON input"
104
t GET libpod/volumes/json?filters='garb1age}' 500 \
105
.cause="invalid character 'g' looking for beginning of value"
106
t GET libpod/volumes/json?filters='{"label":["testl' 500 \
107
.cause="unexpected end of JSON input"
110
t POST volumes/prune?filters='garb1age}' 500 \
111
.cause="invalid character 'g' looking for beginning of value"
112
t POST libpod/volumes/prune?filters='garb1age}' 500 \
113
.cause="invalid character 'g' looking for beginning of value"
116
t POST libpod/volumes/prune?filters='{"label":["testlabel1=testonly"]}' 200
117
t GET libpod/volumes/json?filters='{"label":["testlabel1=testonly"]}' 200 length=0
120
t POST volumes/prune?filters='{"label":["tes' 500 \
121
.cause="unexpected end of JSON input"
122
t POST libpod/volumes/prune?filters='{"label":["tes' 500 \
123
.cause="unexpected end of JSON input"
126
t POST libpod/volumes/prune?filters='{"label":["testlabel"]}' 200
127
t GET libpod/volumes/json?filters='{"label":["testlabel"]}' 200 length=0
130
t POST libpod/volumes/prune?filters='{"name":["anyname"]}' 500 \
131
.cause="\"name\" is an invalid volume filter"
132
t POST libpod/volumes/prune?filters='{"driver":["anydriver"]}' 500 \
133
.cause="\"driver\" is an invalid volume filter"
134
t POST libpod/volumes/prune?filters='{"scope":["anyscope"]}' 500 \
135
.cause="\"scope\" is an invalid volume filter"
138
t POST volumes/prune?filters='{"name":["anyname"]}' 500 \
139
.cause="\"name\" is an invalid volume filter"
140
t POST volumes/prune?filters='{"driver":["anydriver"]}' 500 \
141
.cause="\"driver\" is an invalid volume filter"
142
t POST volumes/prune?filters='{"scope":["anyscope"]}' 500 \
143
.cause="\"scope\" is an invalid volume filter"
146
t POST libpod/volumes/create \
148
Label='{"testuntil":""}' \
149
Options='{"type":"tmpfs","o":"nodev,noexec"}}' \
152
.Labels.testuntil="" \
153
.Options.type=tmpfs \
154
.Options.o=nodev,noexec
157
t POST libpod/volumes/prune?filters='{"until":["500000"]}' 200
158
t GET libpod/volumes/json?filters='{"label":["testuntil"]}' 200 length=1
161
t POST libpod/volumes/prune?filters='{"until":["5000000000"]}' 200
162
t GET libpod/volumes/json?filters='{"label":["testuntil"]}' 200 length=0
164
t POST libpod/volumes/create \
166
Label='{"testuntilcompat":""}' \
167
Options='{"type":"tmpfs","o":"nodev,noexec"}}' \
170
.Labels.testuntilcompat="" \
171
.Options.type=tmpfs \
172
.Options.o=nodev,noexec
175
t POST volumes/prune?filters='{"until":["500000"]}' 200
176
t GET libpod/volumes/json?filters='{"label":["testuntilcompat"]}' 200 length=1
177
t GET libpod/volumes/json?filters='{"until":["500000"]}' 200 length=0
178
t GET libpod/volumes/json?filters='{"until":["5000000000"]}' 200 length=1
181
t POST volumes/prune?filters='{"until":["5000000000"]}' 200
182
t GET libpod/volumes/json?filters='{"label":["testuntilcompat"]}' 200 length=0
185
t POST libpod/volumes/prune 200
187
t GET libpod/volumes/json 200 length=0