db-backup-s3/tests
Shakar Bakr 90c114c647
Add example ConfigMap and Secret for MSSQL backup configuration
- Introduced `k8s-mssql-configmap-example.yaml` and `k8s-mssql-secret-example.yaml` to provide templates for non-sensitive and sensitive configurations, respectively.
- Updated `README.md` and `k8s-statefulset-test.yaml` to reference the new example files.
- Created `k8s-statefulset-with-sidecar.yaml` for deploying MSSQL with a backup sidecar, enhancing the backup functionality.

Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
2025-10-27 13:22:19 +03:00
..
k8s-mssql-configmap-example.yaml Add example ConfigMap and Secret for MSSQL backup configuration 2025-10-27 13:22:19 +03:00
k8s-mssql-secret-example.yaml Add example ConfigMap and Secret for MSSQL backup configuration 2025-10-27 13:22:19 +03:00
k8s-statefulset-test.yaml Add example ConfigMap and Secret for MSSQL backup configuration 2025-10-27 13:22:19 +03:00
k8s-statefulset-with-sidecar.yaml Add example ConfigMap and Secret for MSSQL backup configuration 2025-10-27 13:22:19 +03:00
README.md Add example ConfigMap and Secret for MSSQL backup configuration 2025-10-27 13:22:19 +03:00
setup-minio-k8s.sh Refactor test scripts and README for MSSQL backup functionality 2025-10-23 15:11:27 +03:00
test-mssql-k8s-with-minio.sh Refactor test scripts and README for MSSQL backup functionality 2025-10-23 15:11:27 +03:00
test-mssql-k8s.sh Add example ConfigMap and Secret for MSSQL backup configuration 2025-10-27 13:22:19 +03:00
test-mssql.sh Refactor test scripts and README for MSSQL backup functionality 2025-10-23 15:11:27 +03:00

Test Scripts

This directory contains automated test scripts for validating the backup and restore functionality across different environments.

Files

Docker Compose Tests

  • test-mssql.sh: Tests MSSQL backup/restore using Docker Compose with local MinIO

Kubernetes Tests

  • test-mssql-k8s.sh: Tests MSSQL StatefulSet with backup sidecar (requires existing S3/MinIO)
  • test-mssql-k8s-with-minio.sh: Complete automated test that deploys MinIO alongside MSSQL
  • setup-minio-k8s.sh: Helper script to deploy MinIO in Kubernetes

Kubernetes Configuration Examples

  • k8s-statefulset-with-sidecar.yaml: Production-ready MSSQL StatefulSet with backup sidecar
  • k8s-statefulset-test.yaml: Test StatefulSet configuration used by automated test scripts
  • k8s-mssql-configmap-example.yaml: Example ConfigMap for non-sensitive configuration
  • k8s-mssql-secret-example.yaml: Example Secret for sensitive credentials

Usage

Run the complete automated test with MinIO:

./tests/test-mssql-k8s-with-minio.sh

This will:

  • Create a test namespace (mssql-backup-test)
  • Deploy MinIO
  • Deploy MSSQL StatefulSet with backup sidecar
  • Run backup and restore tests
  • Verify encryption is working

Manual Kubernetes Test

If you have an existing S3 endpoint:

NAMESPACE=mssql-backup-test \
S3_ENDPOINT=http://your-s3:9000 \
S3_ACCESS_KEY_ID=your-key \
S3_SECRET_ACCESS_KEY=your-secret \
./tests/test-mssql-k8s.sh

Docker Compose Test

./tests/test-mssql.sh

Cleanup

Delete the test namespace to remove all resources:

kubectl delete namespace mssql-backup-test