stack-orchestrator/tests/k8s-deploy
Prathamesh Musale c835ad7fdf test(k8s-deploy): cover caddy cert backup install + full backup/restore
Two new test blocks in the existing k8s-deploy run-deploy-test.sh:

1. After first --perform-cluster-management start, assert that
   caddy-cert-backup SA/Role/RoleBinding/CronJob were deployed by
   install_ingress_for_kind.

2. Before final teardown, a full backup→restore cycle: seed a fake
   manager=caddy Secret, trigger the CronJob immediately (kubectl
   create job --from=cronjob), verify the backup file appeared under
   {kind-mount-root}/caddy-cert-backup/caddy-secrets.yaml with the
   seeded value, then stop --perform-cluster-management (destroys
   Kind cluster), start --perform-cluster-management (fresh cluster,
   runs restore before Caddy Deployment), assert the seeded Secret
   was recreated with matching data.

kind-mount-root points at ~/stack-orchestrator-test/kind-mount
(sibling of CERC_REPO_BASE_DIR, outside any deployment dir).
Previous runs' root-owned files are cleaned via sudo rm -rf at start.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 08:55:56 +00:00
..
run-deploy-test.sh test(k8s-deploy): cover caddy cert backup install + full backup/restore 2026-04-17 08:55:56 +00:00