@@ -199,26 +199,18 @@ testDoguHealth_GetAll() {
199199 addFailingTestCase " Dogu-Health-GetAll-Ldap" " Expected to get Dogu 'ldap' is healthy but got only: ${allDogusHealthJson} "
200200 fi
201201
202- if [[ $( echo ${allDogusHealthJson} | ${JQ_BIN_PATH} -r ' .results."nginx-static ".fullName' ) == ' nginx-static ' && $( echo ${allDogusHealthJson} | ${JQ_BIN_PATH} -r ' .results."nginx-static ".healthy' ) == ' true' ]]; then
203- echo " Test: [Dogu-Health-GetAll] Check if NginxStatic is healthy: Success!"
204- addSuccessTestCase " Dogu-Health-GetAll-NginxStatic " " List of returned Dogus contained a healthy 'nginx-static ' dogu."
202+ if [[ $( echo ${allDogusHealthJson} | ${JQ_BIN_PATH} -r ' .results."postfix ".fullName' ) == ' postfix ' && $( echo ${allDogusHealthJson} | ${JQ_BIN_PATH} -r ' .results."postfix ".healthy' ) == ' true' ]]; then
203+ echo " Test: [Dogu-Health-GetAll] Check if Postfix is healthy: Success!"
204+ addSuccessTestCase " Dogu-Health-GetAll-Postfix " " List of returned Dogus contained a healthy 'postfix ' dogu."
205205 else
206- echo " Test: [Dogu-Health-GetAll] Check if NginxStatic is healthy: Failed!"
207- addFailingTestCase " Dogu-Health-GetAll-NginxStatic " " Expected to get Dogu 'nginx-static ' is healthy but got only: ${allDogusHealthJson} "
206+ echo " Test: [Dogu-Health-GetAll] Check if Postfix is healthy: Failed!"
207+ addFailingTestCase " Dogu-Health-GetAll-Postfix " " Expected to get Dogu 'postfix ' is healthy but got only: ${allDogusHealthJson} "
208208 fi
209-
210- if [[ $( echo ${allDogusHealthJson} | ${JQ_BIN_PATH} -r ' .results."nginx-ingress".fullName' ) == ' nginx-ingress' && $( echo ${allDogusHealthJson} | ${JQ_BIN_PATH} -r ' .results."nginx-ingress".healthy' ) == ' true' ]]; then
211- echo " Test: [Dogu-Health-GetAll] Check if NginxIngress is healthy: Success!"
212- addSuccessTestCase " Dogu-Health-GetAll-NginxIngress" " List of returned Dogus contained a healthy 'nginx-ingress' dogu."
213- else
214- echo " Test: [Dogu-Health-GetAll] Check if NginxIngress is healthy: Failed!"
215- addFailingTestCase " Dogu-Health-GetAll-NginxIngress" " Expected to get Dogu 'nginx-ingress' is healthy but got only: ${allDogusHealthJson} "
216- fi
217209}
218210
219211testDoguHealth_GetByNames () {
220212 local dogusHealthJson
221- dogusHealthJson=$( ${GRPCURL_BIN_PATH} -plaintext -d ' {"dogus": ["nginx-static ", "ldap"]}' localhost:" ${GRPCURL_PORT} " health.DoguHealth.GetByNames)
213+ dogusHealthJson=$( ${GRPCURL_BIN_PATH} -plaintext -d ' {"dogus": ["postfix ", "ldap"]}' localhost:" ${GRPCURL_PORT} " health.DoguHealth.GetByNames)
222214
223215 if [[ $( echo ${dogusHealthJson} | ${JQ_BIN_PATH} -r ' .results.ldap.fullName' ) == ' ldap' && $( echo ${dogusHealthJson} | ${JQ_BIN_PATH} -r ' .results.ldap.healthy' ) == ' true' ]]; then
224216 echo " Test: [Dogu-Health-GetByNames] Check if Ldap is healthy: Success!"
@@ -228,12 +220,12 @@ testDoguHealth_GetByNames() {
228220 addFailingTestCase " Dogu-Health-GetByNames-Ldap" " Expected to get Dogu 'ldap' is healthy but got only: ${dogusHealthJson} "
229221 fi
230222
231- if [[ $( echo ${dogusHealthJson} | ${JQ_BIN_PATH} -r ' .results."nginx-static ".fullName' ) == ' nginx-static ' && $( echo ${dogusHealthJson} | ${JQ_BIN_PATH} -r ' .results."nginx-static ".healthy' ) == ' true' ]]; then
232- echo " Test: [Dogu-Health-GetByNames] Check if NginxStatic is healthy: Success!"
233- addSuccessTestCase " Dogu-Health-GetByNames-NginxStatic " " List of returned Dogus contained a healthy 'nginx-static ' dogu."
223+ if [[ $( echo ${dogusHealthJson} | ${JQ_BIN_PATH} -r ' .results."postfix ".fullName' ) == ' postfix ' && $( echo ${dogusHealthJson} | ${JQ_BIN_PATH} -r ' .results."postfix ".healthy' ) == ' true' ]]; then
224+ echo " Test: [Dogu-Health-GetByNames] Check if Postfix is healthy: Success!"
225+ addSuccessTestCase " Dogu-Health-GetByNames-Postfix " " List of returned Dogus contained a healthy 'postfix ' dogu."
234226 else
235- echo " Test: [Dogu-Health-GetByNames] Check if NginxStatic is healthy: Failed!"
236- addFailingTestCase " Dogu-Health-GetByNames-NginxStatic " " Expected to get Dogu 'nginx-static ' is healthy but got only: ${dogusHealthJson} "
227+ echo " Test: [Dogu-Health-GetByNames] Check if Postfix is healthy: Failed!"
228+ addFailingTestCase " Dogu-Health-GetByNames-Postfix " " Expected to get Dogu 'postfix ' is healthy but got only: ${dogusHealthJson} "
237229 fi
238230
239231 if [[ $( echo ${dogusHealthJson} | ${JQ_BIN_PATH} -r ' .results | length' ) == ' 2' ]]; then
@@ -247,43 +239,43 @@ testDoguHealth_GetByNames() {
247239
248240testDoguHealth_GetByName () {
249241 local doguHealthJson
250- doguHealthJson=$( ${GRPCURL_BIN_PATH} -plaintext -d ' {"dogu_name": "nginx-static "}' localhost:" ${GRPCURL_PORT} " health.DoguHealth.GetByName)
242+ doguHealthJson=$( ${GRPCURL_BIN_PATH} -plaintext -d ' {"dogu_name": "postfix "}' localhost:" ${GRPCURL_PORT} " health.DoguHealth.GetByName)
251243
252- if [[ $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' .fullName' ) == ' nginx-static ' && $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' .healthy' ) == ' true' ]]; then
253- echo " Test: [Dogu-Health-GetByName] Check if NginxStatic is healthy: Success!"
254- addSuccessTestCase " Dogu-Health-GetByName-NginxStatic " " List of returned Dogus contained a healthy 'nginx-static ' dogu."
244+ if [[ $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' .fullName' ) == ' postfix ' && $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' .healthy' ) == ' true' ]]; then
245+ echo " Test: [Dogu-Health-GetByName] Check if Postfix is healthy: Success!"
246+ addSuccessTestCase " Dogu-Health-GetByName-Postfix " " List of returned Dogus contained a healthy 'postfix ' dogu."
255247 else
256- echo " Test: [Dogu-Health-GetByName] Check if NginxStatic is healthy: Failed!"
257- addFailingTestCase " Dogu-Health-GetByName-NginxStatic " " Expected to get Dogu 'nginx-static ' is healthy but got only: ${doguHealthJson} "
248+ echo " Test: [Dogu-Health-GetByName] Check if Postfix is healthy: Failed!"
249+ addFailingTestCase " Dogu-Health-GetByName-Postfix " " Expected to get Dogu 'postfix ' is healthy but got only: ${doguHealthJson} "
258250 fi
259251
260- ${GRPCURL_BIN_PATH} -plaintext -d ' {"doguName": "nginx-static "}' localhost:" ${GRPCURL_PORT} " doguAdministration.DoguAdministration.StopDogu > /dev/null 2>&1
252+ ${GRPCURL_BIN_PATH} -plaintext -d ' {"doguName": "postfix "}' localhost:" ${GRPCURL_PORT} " doguAdministration.DoguAdministration.StopDogu > /dev/null 2>&1
261253 # Wait for dogu to be terminated
262254 sleep 5s
263255
264- doguHealthJson=$( ${GRPCURL_BIN_PATH} -plaintext -d ' {"dogu_name": "nginx-static "}' localhost:" ${GRPCURL_PORT} " health.DoguHealth.GetByName)
256+ doguHealthJson=$( ${GRPCURL_BIN_PATH} -plaintext -d ' {"dogu_name": "postfix "}' localhost:" ${GRPCURL_PORT} " health.DoguHealth.GetByName)
265257
266- if [[ $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' .fullName' ) == ' nginx-static ' && $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' has("healthy")' ) == ' false' ]]; then
267- echo " Test: [Dogu-Health-GetByName] Check if NginxStatic is not healthy: Success!"
268- addSuccessTestCase " Dogu-Health-GetByName-NginxStatic " " List of returned Dogus contained a not-healthy 'nginx-static ' dogu."
258+ if [[ $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' .fullName' ) == ' postfix ' && $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' has("healthy")' ) == ' false' ]]; then
259+ echo " Test: [Dogu-Health-GetByName] Check if Postfix is not healthy: Success!"
260+ addSuccessTestCase " Dogu-Health-GetByName-Postfix " " List of returned Dogus contained a not-healthy 'postfix ' dogu."
269261 else
270- echo " Test: [Dogu-Health-GetByName] Check if NginxStatic is not healthy: Failed!"
271- addFailingTestCase " Dogu-Health-GetByName-NginxStatic " " Expected to get Dogu 'nginx-static ' is not-healthy but got only: ${doguHealthJson} "
262+ echo " Test: [Dogu-Health-GetByName] Check if Postfix is not healthy: Failed!"
263+ addFailingTestCase " Dogu-Health-GetByName-Postfix " " Expected to get Dogu 'postfix ' is not-healthy but got only: ${doguHealthJson} "
272264 fi
273265
274266
275- ${GRPCURL_BIN_PATH} -plaintext -d ' {"doguName": "nginx-static "}' localhost:" ${GRPCURL_PORT} " doguAdministration.DoguAdministration.StartDogu > /dev/null 2>&1
267+ ${GRPCURL_BIN_PATH} -plaintext -d ' {"doguName": "postfix "}' localhost:" ${GRPCURL_PORT} " doguAdministration.DoguAdministration.StartDogu > /dev/null 2>&1
276268 # Wait for dogu to be started
277269 sleep 20s
278270
279- doguHealthJson=$( ${GRPCURL_BIN_PATH} -plaintext -d ' {"dogu_name": "nginx-static "}' localhost:" ${GRPCURL_PORT} " health.DoguHealth.GetByName)
271+ doguHealthJson=$( ${GRPCURL_BIN_PATH} -plaintext -d ' {"dogu_name": "postfix "}' localhost:" ${GRPCURL_PORT} " health.DoguHealth.GetByName)
280272
281- if [[ $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' .fullName' ) == ' nginx-static ' && $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' .healthy' ) == ' true' ]]; then
282- echo " Test: [Dogu-Health-GetByName] Check if NginxStatic is healthy: Success!"
283- addSuccessTestCase " Dogu-Health-GetByName-NginxStatic " " List of returned Dogus contained a healthy 'nginx-static ' dogu."
273+ if [[ $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' .fullName' ) == ' postfix ' && $( echo ${doguHealthJson} | ${JQ_BIN_PATH} -r ' .healthy' ) == ' true' ]]; then
274+ echo " Test: [Dogu-Health-GetByName] Check if Postfix is healthy: Success!"
275+ addSuccessTestCase " Dogu-Health-GetByName-Postfix " " List of returned Dogus contained a healthy 'postfix ' dogu."
284276 else
285- echo " Test: [Dogu-Health-GetByName] Check if NginxStatic is healthy: Failed!"
286- addFailingTestCase " Dogu-Health-GetByName-NginxStatic " " Expected to get Dogu 'nginx-static ' is healthy but got only: ${doguHealthJson} "
277+ echo " Test: [Dogu-Health-GetByName] Check if Postfix is healthy: Failed!"
278+ addFailingTestCase " Dogu-Health-GetByName-Postfix " " Expected to get Dogu 'postfix ' is healthy but got only: ${doguHealthJson} "
287279 fi
288280}
289281
0 commit comments