Skip to content

Commit

Permalink
Update integ-test for testing each versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jlandowner committed Aug 14, 2024
1 parent 4e6c6d2 commit 44ca5e9
Show file tree
Hide file tree
Showing 36 changed files with 3,873 additions and 2,199 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ HELM_PLUGIN_PATH := $(shell helm env | grep HELM_PLUGINS | cut -d= -f2)

.PHONY: integ-test
integ-test: install-dev-bin
helm chartsnap --chart example/app1 -f example/app1/test/test_ingress_enabled.yaml --namespace default $(ARGS)
helm chartsnap --chart example/app1 -f example/app1/test/ --namespace default $(ARGS)
helm chartsnap --chart example/app1 -f example/app1/test_latest/test_ingress_enabled.yaml --namespace default $(ARGS)
helm chartsnap --chart example/app1 -f example/app1/test_latest/ --namespace default $(ARGS)
helm chartsnap --chart example/app1 -f example/app1/test_v1/ --namespace default $(ARGS)
helm chartsnap --chart example/app1 -f example/app1/test_v2/ --namespace default $(ARGS)
helm chartsnap --chart example/app1 -f example/app1/test_v3/ --namespace default $(ARGS)
helm chartsnap --chart oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric -f example/remote/nginx-gateway-fabric.values.yaml $(ARGS) -- --namespace nginx-gateway $(EXTRA_ARGS)
helm chartsnap --chart cilium -f example/remote/cilium.values.yaml $(ARGS) -- --namespace kube-system --repo https://helm.cilium.io $(EXTRA_ARGS)
helm chartsnap --chart ingress-nginx -f example/remote/ingress-nginx.values.yaml $(ARGS) -- --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --skip-tests $(EXTRA_ARGS)
Expand Down
237 changes: 119 additions & 118 deletions example/app1/__snapshots__/default.snap

Large diffs are not rendered by default.

File renamed without changes.
125 changes: 125 additions & 0 deletions example/app1/test_latest/__snapshots__/test_certmanager_enabled.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# chartsnap: snapshot_version=v3
---
# Source: app1/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: chartsnap-app1
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
automountServiceAccountToken: true
---
# Source: app1/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: chartsnap-app1
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
---
# Source: app1/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: chartsnap-app1
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
template:
metadata:
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
serviceAccountName: chartsnap-app1
securityContext: {}
containers:
- name: app1
securityContext: {}
image: "nginx:1.16.0"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources: {}
---
# Source: app1/templates/cert.yaml
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
name: app1-cert
namespace: default
spec:
dnsNames:
- chartsnap-app1.default.svc
- chartsnap-app1.default.svc.cluster.local
issuerRef:
kind: Issuer
name: nameOfClusterIssuer
secretName: app1-cert
---
# Source: app1/templates/tests/test-connection.yaml
apiVersion: v1
kind: Pod
metadata:
name: "chartsnap-app1-test-connection"
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['chartsnap-app1:80']
restartPolicy: Never
147 changes: 147 additions & 0 deletions example/app1/test_latest/__snapshots__/test_hpa_enabled.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# chartsnap: snapshot_version=v3
---
# Source: app1/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: chartsnap-app1
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
automountServiceAccountToken: true
---
# Source: app1/templates/cert.yaml
apiVersion: v1
kind: Secret
metadata:
name: app1-cert
namespace: default
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
type: kubernetes.io/tls
data:
ca.crt: IyMjRFlOQU1JQ19GSUVMRCMjIw==
tls.crt: IyMjRFlOQU1JQ19GSUVMRCMjIw==
tls.key: IyMjRFlOQU1JQ19GSUVMRCMjIw==
---
# Source: app1/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: chartsnap-app1
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
---
# Source: app1/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: chartsnap-app1
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
selector:
matchLabels:
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
template:
metadata:
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
serviceAccountName: chartsnap-app1
securityContext: {}
containers:
- name: app1
securityContext: {}
image: "nginx:1.16.0"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources: {}
---
# Source: app1/templates/hpa.yaml
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: chartsnap-app1
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: chartsnap-app1
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 65
---
# Source: app1/templates/tests/test-connection.yaml
apiVersion: v1
kind: Pod
metadata:
name: "chartsnap-app1-test-connection"
labels:
helm.sh/chart: app1-0.1.0
app.kubernetes.io/name: app1
app.kubernetes.io/instance: chartsnap
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['chartsnap-app1:80']
restartPolicy: Never
Loading

0 comments on commit 44ca5e9

Please sign in to comment.