blob: 7c8a1b0dbb995d01fb2985ecd5f96569f52b84a6 [file] [log] [blame]
Sylvain Desbureaux1d061a42019-11-08 15:27:20 +01001---
2suite: test deployment behavior
3templates:
4 - deployment.yaml
5tests:
6 - it: "should render with default values (global)"
7 asserts:
8 - isKind:
9 of: Deployment
10 - equal:
11 path: metadata.name
12 value: RELEASE-NAME-nbi
13 - equal:
14 path: metadata.namespace
15 value: NAMESPACE
16 - matchRegex:
17 path: metadata.labels.app
18 pattern: nbi
19 - matchRegex:
20 path: spec.template.metadata.labels.app
21 pattern: nbi
22 - equal:
23 path: spec.template.metadata.name
24 value: RELEASE-NAME-nbi
25 - equal:
26 path: spec.replicas
27 value: 1
28 - isNull:
29 path: spec.template.spec.nodeSelector
30 - isNull:
31 path: spec.template.spec.affinity
32
33 - it: "should render with default value (container)"
34 asserts:
35 - equal:
36 path: spec.template.spec.containers[0].name
37 value: nbi
38 - equal:
39 path: spec.template.spec.containers[0].image
40 value: nexus3.onap.org:10001/onap/externalapi/nbi:5.0.1
41 - equal:
42 path: spec.template.spec.containers[0].imagePullPolicy
43 value: IfNotPresent
44 - contains:
45 path: spec.template.spec.containers[0].env
46 content:
47 name: SPRING_DATASOURCE_URL
48 value: jdbc:mariadb://mariadb-galera:3306/nbi
49 - contains:
50 path: spec.template.spec.containers[0].env
51 content:
52 name: SPRING_DATASOURCE_USERNAME
53 value: rene
54 - contains:
55 path: spec.template.spec.containers[0].env
56 content:
57 name: SPRING_DATASOURCE_PASSWORD
58 valueFrom:
59 secretKeyRef:
60 name: RELEASE-NAME-nbi-config
61 key: db-user-password
62 - contains:
63 path: spec.template.spec.containers[0].env
64 content:
65 name: SPRING_DATA_MONGODB_HOST
66 value: nbi-mongohost.NAMESPACE
67 - contains:
68 path: spec.template.spec.containers[0].env
69 content:
70 name: SPRING_DATA_MONGODB_PORT
71 value: "27017"
72 - contains:
73 path: spec.template.spec.containers[0].env
74 content:
75 name: SPRING_DATA_MONGODB_DATABASE
76 value: ServiceOrderDB
77 - contains:
78 path: spec.template.spec.containers[0].env
79 content:
80 name: ONAP_LCPCLOUDREGIONID
81 value: RegionOne
82 - contains:
83 path: spec.template.spec.containers[0].env
84 content:
85 name: ONAP_TENANTID
86 value: 31047205ce114b60833b23e400d6a535
87 - contains:
88 path: spec.template.spec.containers[0].env
89 content:
90 name: ONAP_CLOUDOWNER
91 value: CloudOwner
92 - contains:
93 path: spec.template.spec.containers[0].env
94 content:
95 name: NBI_URL
96 value: http://nbi.NAMESPACE:8080/nbi/api/v4
97 - contains:
98 path: spec.template.spec.containers[0].env
99 content:
100 name: SDC_HOST
101 value: https://sdc-be.NAMESPACE:8443
102 - contains:
103 path: spec.template.spec.containers[0].env
104 content:
105 name: SDC_HEADER_ECOMPINSTANCEID
106 value: OOM
107 - contains:
108 path: spec.template.spec.containers[0].env
109 content:
110 name: SDC_HEADER_AUTHORIZATION
111 value: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
112 - contains:
113 path: spec.template.spec.containers[0].env
114 content:
115 name: AAI_HOST
116 value: https://aai.NAMESPACE:8443
117 - contains:
118 path: spec.template.spec.containers[0].env
119 content:
120 name: AAI_HEADER_AUTHORIZATION
121 value: Basic QUFJOkFBSQ==
122 - contains:
123 path: spec.template.spec.containers[0].env
124 content:
125 name: SO_HOST
126 value: http://so.NAMESPACE:8080
127 - contains:
128 path: spec.template.spec.containers[0].env
129 content:
130 name: DMAAP_HOST
131 value: http://message-router.NAMESPACE:3904
132 - contains:
133 path: spec.template.spec.containers[0].env
134 content:
135 name: LOGGING_LEVEL_ORG_ONAP_NBI
136 value: INFO
137 - contains:
138 path: spec.template.spec.containers[0].env
139 content:
140 name: MSB_ENABLED
141 value: "true"
142 - contains:
143 path: spec.template.spec.containers[0].env
144 content:
145 name: MSB_DISCOVERY_HOST
146 value: msb-discovery.NAMESPACE
147 - contains:
148 path: spec.template.spec.containers[0].env
149 content:
150 name: MSB_DISCOVERY_PORT
151 value: "10081"
152 - equal:
153 path: spec.template.spec.containers[0].livenessProbe
154 value:
155 initialDelaySeconds: 180
156 periodSeconds: 30
157 tcpSocket:
158 port: 8080
159 - equal:
160 path: spec.template.spec.containers[0].readinessProbe
161 value:
162 initialDelaySeconds: 185
163 periodSeconds: 30
164 tcpSocket:
165 port: 8080
166 - contains:
167 path: spec.template.spec.containers[0].ports
168 content:
169 containerPort: 8080
170 - equal:
171 path: spec.template.spec.containers[0].resources.limits.cpu
172 value: 1
173 - equal:
174 path: spec.template.spec.containers[0].resources.limits.memory
175 value: 2Gi
176 - equal:
177 path: spec.template.spec.containers[0].resources.requests.cpu
178 value: 100m
179 - equal:
180 path: spec.template.spec.containers[0].resources.requests.memory
181 value: 1Gi
182 - it: "should render when deciding to use local cluster (container)"
183 set:
184 global:
185 mariadbGalera:
186 localCluster: true
187 asserts:
188 - contains:
189 path: spec.template.spec.containers[0].env
190 content:
191 name: SPRING_DATASOURCE_URL
192 value: jdbc:mariadb://nbi-galera:3306/nbi
193 - contains:
194 path: spec.template.spec.containers[0].env
195 content:
196 name: SPRING_DATASOURCE_USERNAME
197 value: rene
198 - contains:
199 path: spec.template.spec.containers[0].env
200 content:
201 name: SPRING_DATASOURCE_PASSWORD
202 valueFrom:
203 secretKeyRef:
204 name: RELEASE-NAME-nbi-nbi-galera
205 key: user-password