From ee8ceecc0eb112f5de3d93063c4f3402df3c5d64 Mon Sep 17 00:00:00 2001 From: Aleksei Sviridkin Date: Mon, 20 Apr 2026 15:58:55 +0300 Subject: [PATCH] test(etcd): add e2e for etcd application and backup schedule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Aleksei Sviridkin --- hack/e2e-apps/etcd.bats | 58 +++++++++++++++++++ .../extra/etcd/templates/backup-secret.yaml | 2 +- .../etcd/templates/etcd-backup-schedule.yaml | 4 +- 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 hack/e2e-apps/etcd.bats diff --git a/hack/e2e-apps/etcd.bats b/hack/e2e-apps/etcd.bats new file mode 100644 index 000000000..cdee713d9 --- /dev/null +++ b/hack/e2e-apps/etcd.bats @@ -0,0 +1,58 @@ +#!/usr/bin/env bats + +@test "Create Etcd" { + name='test' + kubectl -n tenant-test delete etcd.apps.cozystack.io $name --ignore-not-found --timeout=2m || true + kubectl apply -f- <