File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ generate:
1919 cozyvalues-gen -m ' httpcache' -v values.yaml -s values.schema.json -r README.md -g ../../../api/apps/v1alpha1/httpcache/types.go
2020 ../../../hack/update-crd.sh
2121
22+ .PHONY : test
23+ test :
24+ helm unittest .
25+
2226update :
2327 tag=$$(git ls-remote --tags --sort="v:refname" https://github.com/chrislim2888/IP2Location-C-Library | awk -F'[/^]' 'END{print $$3}' ) && \
2428 sed -i " /^ARG IP2LOCATION_C_VERSION=/ s/=.*/=$$ tag/" images/nginx/Dockerfile
Original file line number Diff line number Diff line change 1+ suite : haproxy default render
2+ templates :
3+ - templates/haproxy/deployment.yaml
4+ - templates/haproxy/configmap.yaml
5+
6+ release :
7+ name : http-cache-test
8+ namespace : tenant-test
9+
10+ tests :
11+ - it : renders the haproxy Deployment with the default replica count
12+ template : templates/haproxy/deployment.yaml
13+ asserts :
14+ - hasDocuments :
15+ count : 1
16+ - equal :
17+ path : spec.replicas
18+ value : 2
19+ - equal :
20+ path : spec.template.spec.containers[0].image
21+ value : haproxy:latest
Original file line number Diff line number Diff line change 1+ suite : nginx cache default render
2+ templates :
3+ - templates/nginx/deployment.yaml
4+ - templates/nginx/configmap.yaml
5+
6+ release :
7+ name : http-cache-test
8+ namespace : tenant-test
9+
10+ tests :
11+ - it : renders a PodDisruptionBudget plus a Deployment, PVC and Service per nginx replica
12+ template : templates/nginx/deployment.yaml
13+ asserts :
14+ - hasDocuments :
15+ count : 7
16+
17+ - it : pins the nginx cache image on the first replica's Deployment
18+ template : templates/nginx/deployment.yaml
19+ documentIndex : 1
20+ asserts :
21+ - equal :
22+ path : kind
23+ value : Deployment
24+ - equal :
25+ path : spec.template.spec.containers[0].image
26+ value : ghcr.io/cozystack/cozystack/nginx-cache:v1.6.0@sha256:bd042a8a9789e8b21b12cb266e390484a3a48f4af6ca6e2d2864a8a83c74bd25
27+
28+ - it : sizes the first replica's PVC from values.size
29+ template : templates/nginx/deployment.yaml
30+ documentIndex : 2
31+ asserts :
32+ - equal :
33+ path : kind
34+ value : PersistentVolumeClaim
35+ - equal :
36+ path : spec.resources.requests.storage
37+ value : 10Gi
You can’t perform that action at this time.
0 commit comments