test(etcd): add e2e for etcd application and backup schedule

Adds two bats cases: a baseline Etcd managed-app deployment and a
deployment with backup.enabled=true that verifies the
EtcdBackupSchedule resource and the S3 credentials Secret are
materialized. The backup case uses fake S3 credentials — the
operator will not successfully push backups, but the schedule
resource itself is reconciled, which is what this test validates.

Also hardcodes the EtcdBackupSchedule and backup Secret names to
'etcd' / 'etcd-s3-creds' to match the existing hardcoded
EtcdCluster name in the chart (one etcd per tenant namespace).

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
Aleksei Sviridkin committed 2026-04-20 15:58:55 +03:00
1 parent 51c8192e1e
commit ee8ceecc0e
3 files changed
+61 -3

No files matched your search

@@ -3,7 +3,7 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-s3-creds
name: etcd-s3-creds
stringData:
AWS_ACCESS_KEY_ID: {{ required "s3AccessKey is not specified!" .Values.backup.s3AccessKey | quote }}
AWS_SECRET_ACCESS_KEY: {{ required "s3SecretKey is not specified!" .Values.backup.s3SecretKey | quote }}
@@ -7,7 +7,7 @@
apiVersion: etcd.aenix.io/v1alpha1
kind: EtcdBackupSchedule
metadata:
name: {{ .Release.Name }}
name: etcd
spec:
clusterRef:
name: etcd
@@ -26,5 +26,5 @@ spec:
{{- end }}
forcePathStyle: {{ .Values.backup.forcePathStyle }}
credentialsSecretRef:
name: {{ .Release.Name }}-s3-creds
name: etcd-s3-creds
{{- end }}