Skip to content

Commit f2010a3

Browse files
committed
adding tests
1 parent dde9699 commit f2010a3

5 files changed

+105
-0
lines changed

tests/clustergroup-industrial-edge-factory.expected.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,27 @@ metadata:
443443
annotations:
444444
argocd.argoproj.io/compare-options: IgnoreExtraneous
445445
spec:
446+
resourceCustomizations: |
447+
PersistentVolumeClaim:
448+
health.lua: |
449+
hs = {}
450+
if obj.status ~= nil then
451+
if obj.status.phase ~= nil then
452+
if obj.status.phase == "Pending" then
453+
hs.status = "Healthy"
454+
hs.message = obj.status.phase
455+
return hs
456+
end
457+
if obj.status.phase == "Bound" then
458+
hs.status = "Healthy"
459+
hs.message = obj.status.phase
460+
return hs
461+
end
462+
end
463+
end
464+
hs.status = "Progressing"
465+
hs.message = "Waiting for PVC"
466+
return hs
446467
applicationInstanceLabelKey: argocd.argoproj.io/instance
447468
# Not the greatest way to pass git/quay info to sub-applications, but it will do until
448469
# we can support helmChart with kustomize

tests/clustergroup-industrial-edge-hub.expected.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,27 @@ metadata:
10761076
annotations:
10771077
argocd.argoproj.io/compare-options: IgnoreExtraneous
10781078
spec:
1079+
resourceCustomizations: |
1080+
PersistentVolumeClaim:
1081+
health.lua: |
1082+
hs = {}
1083+
if obj.status ~= nil then
1084+
if obj.status.phase ~= nil then
1085+
if obj.status.phase == "Pending" then
1086+
hs.status = "Healthy"
1087+
hs.message = obj.status.phase
1088+
return hs
1089+
end
1090+
if obj.status.phase == "Bound" then
1091+
hs.status = "Healthy"
1092+
hs.message = obj.status.phase
1093+
return hs
1094+
end
1095+
end
1096+
end
1097+
hs.status = "Progressing"
1098+
hs.message = "Waiting for PVC"
1099+
return hs
10791100
applicationInstanceLabelKey: argocd.argoproj.io/instance
10801101
# Not the greatest way to pass git/quay info to sub-applications, but it will do until
10811102
# we can support helmChart with kustomize

tests/clustergroup-medical-diagnosis-hub.expected.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,27 @@ metadata:
12521252
annotations:
12531253
argocd.argoproj.io/compare-options: IgnoreExtraneous
12541254
spec:
1255+
resourceCustomizations: |
1256+
PersistentVolumeClaim:
1257+
health.lua: |
1258+
hs = {}
1259+
if obj.status ~= nil then
1260+
if obj.status.phase ~= nil then
1261+
if obj.status.phase == "Pending" then
1262+
hs.status = "Healthy"
1263+
hs.message = obj.status.phase
1264+
return hs
1265+
end
1266+
if obj.status.phase == "Bound" then
1267+
hs.status = "Healthy"
1268+
hs.message = obj.status.phase
1269+
return hs
1270+
end
1271+
end
1272+
end
1273+
hs.status = "Progressing"
1274+
hs.message = "Waiting for PVC"
1275+
return hs
12551276
applicationInstanceLabelKey: argocd.argoproj.io/instance
12561277
# Not the greatest way to pass git/quay info to sub-applications, but it will do until
12571278
# we can support helmChart with kustomize

tests/clustergroup-naked.expected.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,27 @@ metadata:
266266
annotations:
267267
argocd.argoproj.io/compare-options: IgnoreExtraneous
268268
spec:
269+
resourceCustomizations: |
270+
PersistentVolumeClaim:
271+
health.lua: |
272+
hs = {}
273+
if obj.status ~= nil then
274+
if obj.status.phase ~= nil then
275+
if obj.status.phase == "Pending" then
276+
hs.status = "Healthy"
277+
hs.message = obj.status.phase
278+
return hs
279+
end
280+
if obj.status.phase == "Bound" then
281+
hs.status = "Healthy"
282+
hs.message = obj.status.phase
283+
return hs
284+
end
285+
end
286+
end
287+
hs.status = "Progressing"
288+
hs.message = "Waiting for PVC"
289+
return hs
269290
applicationInstanceLabelKey: argocd.argoproj.io/instance
270291
# Not the greatest way to pass git/quay info to sub-applications, but it will do until
271292
# we can support helmChart with kustomize

tests/clustergroup-normal.expected.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,27 @@ metadata:
841841
annotations:
842842
argocd.argoproj.io/compare-options: IgnoreExtraneous
843843
spec:
844+
resourceCustomizations: |
845+
PersistentVolumeClaim:
846+
health.lua: |
847+
hs = {}
848+
if obj.status ~= nil then
849+
if obj.status.phase ~= nil then
850+
if obj.status.phase == "Pending" then
851+
hs.status = "Healthy"
852+
hs.message = obj.status.phase
853+
return hs
854+
end
855+
if obj.status.phase == "Bound" then
856+
hs.status = "Healthy"
857+
hs.message = obj.status.phase
858+
return hs
859+
end
860+
end
861+
end
862+
hs.status = "Progressing"
863+
hs.message = "Waiting for PVC"
864+
return hs
844865
applicationInstanceLabelKey: argocd.argoproj.io/instance
845866
# Not the greatest way to pass git/quay info to sub-applications, but it will do until
846867
# we can support helmChart with kustomize

0 commit comments

Comments
 (0)