forked from sonatype/nexus-iq-server-ha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iq-server-pv_test.yaml
264 lines (253 loc) · 6.27 KB
/
iq-server-pv_test.yaml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
suite: iq-server-service
templates:
- iq-server-pv.yaml
tests:
- it: renders with defaults
asserts:
- hasDocuments:
count: 1
- isKind:
of: PersistentVolume
documentIndex: 0
- equal:
path: apiVersion
value: v1
documentIndex: 0
- equal:
path: metadata.name
value: iq-server-pv
documentIndex: 0
- equal:
path: metadata.annotations
value:
"helm.sh/resource-policy": keep
documentIndex: 0
- equal:
path: spec
value:
accessModes:
- ReadWriteMany
capacity:
storage: 1Gi
claimRef:
name: iq-server-pvc
namespace: NAMESPACE
persistentVolumeReclaimPolicy: Retain
storageClassName: ""
volumeMode: Filesystem
documentIndex: 0
- it: renders with overridden values
set:
iq_server:
persistence:
persistentVolumeName: "iq-server-pv-1"
persistentVolumeRetainPolicy: "delete"
size: "2Gi"
hostPath:
path: "/mnt/iq"
type: DirectoryOrCreate
asserts:
- hasDocuments:
count: 1
- equal:
path: metadata.name
value: iq-server-pv-1
documentIndex: 0
- equal:
path: metadata.annotations
value:
"helm.sh/resource-policy": delete
documentIndex: 0
- equal:
path: spec.capacity.storage
value: 2Gi
documentIndex: 0
- equal:
path: spec.hostPath.path
value: /mnt/iq
documentIndex: 0
- equal:
path: spec.hostPath.type
value: DirectoryOrCreate
documentIndex: 0
- it: does create PV if name is given
set:
iq_server:
persistence:
persistentVolumeName: "pv-name"
asserts:
- isKind:
of: PersistentVolume
documentIndex: 0
- it: does not create PV if name is not given
set:
iq_server:
persistence:
persistentVolumeName: ""
asserts:
- hasDocuments:
count: 0
- it: can set access modes
set:
iq_server:
persistence:
accessModes:
- "access1"
- "access2"
asserts:
- equal:
path: spec.accessModes
value:
- access1
- access2
documentIndex: 0
- it: can set cephfs minimal
set:
iq_server:
persistence:
cephfs:
monitors:
- "monitor1"
- "monitor2"
asserts:
- equal:
path: spec.cephfs
value:
readOnly: false
monitors:
- "monitor1"
- "monitor2"
documentIndex: 0
- it: can set csi minimal
set:
iq_server:
persistence:
csi:
driver: "someDriver"
volumeHandle: "someVolumeHandle"
fsType: "someFsType"
asserts:
- equal:
path: spec.csi
value:
readOnly: false
driver: "someDriver"
volumeHandle: "someVolumeHandle"
fsType: "someFsType"
documentIndex: 0
- it: can set csi full
set:
iq_server:
persistence:
csi:
driver: "someDriver"
volumeHandle: "someVolumeHandle"
fsType: "someFsType"
controllerExpandSecretRef:
namespace: "ns1"
name: "n1"
controllerPublishSecretRef:
namespace: "ns2"
name: "n2"
nodePublishSecretRef:
namespace: "ns3"
name: "n3"
nodeStageSecretRef:
namespace: "ns4"
name: "n4"
volumeAttributes:
attributeName1: attributeValue1
attributeName2: attributeValue2
asserts:
- equal:
path: spec.csi
value:
readOnly: false
driver: "someDriver"
volumeHandle: "someVolumeHandle"
fsType: "someFsType"
controllerExpandSecretRef:
namespace: "ns1"
name: "n1"
controllerPublishSecretRef:
namespace: "ns2"
name: "n2"
nodePublishSecretRef:
namespace: "ns3"
name: "n3"
nodeStageSecretRef:
namespace: "ns4"
name: "n4"
volumeAttributes:
attributeName1: attributeValue1
attributeName2: attributeValue2
documentIndex: 0
- it: can set nfs
set:
iq_server:
persistence:
nfs:
server: "someServer"
path: "somePath"
asserts:
- equal:
path: spec.nfs
value:
readOnly: false
server: "someServer"
path: "somePath"
documentIndex: 0
- it: can set hostPath
set:
iq_server:
persistence:
hostPath:
path: "somePath"
type: "someType"
asserts:
- equal:
path: spec.hostPath
value:
path: "somePath"
type: "someType"
documentIndex: 0
- it: can set nodeSelectorTerms
set:
iq_server:
persistence:
nodeAffinity:
nodeSelectorTerms:
term1: value1
term2: value2
asserts:
- equal:
path: spec.nodeAffinity.required.nodeSelectorTerms
value:
term1: value1
term2: value2
documentIndex: 0
- it: can set cephfs full
set:
iq_server:
persistence:
cephfs:
monitors:
- "monitor1"
- "monitor2"
path: "somePath"
secretFile: "someSecretFile"
secretRef: "someSecretRef"
user: "someUser"
asserts:
- equal:
path: spec.cephfs
value:
readOnly: false
monitors:
- "monitor1"
- "monitor2"
path: "somePath"
secretFile: "someSecretFile"
secretRef: "someSecretRef"
user: "someUser"
documentIndex: 0