SHIELD Phalanx is a comprehensive integration test suite for the SHIELD backup and restore platform. It tests backup/restore operations against multiple target databases.
-
PostgreSQL (backup/restore all databases and single database)
-
MariaDB/MySQL (backup/restore all databases and single database)
-
MongoDB (backup/restore)
-
Consul (backup/restore with and without TLS)
-
etcd (backup/restore with and without TLS)
- Docker and Docker Compose (v2+)
-
Run the tests:
cd docker/ make test
No credentials or
.envfile required — tests use a built-in RustFS container for S3-compatible storage.The
make buildstep automatically clones SHIELD source from thedevelopbranch. To use a different branch:SHIELD_BRANCH=main make testTo test on Ubuntu Noble (24.04) instead of Jammy (22.04):
UBUNTU_RELEASE=noble make testOr step by step:
make build # Build Docker images make up # Start all services make shell # Debug: open shell in test container make down # Tear down
Phalanx deploys the following services in Docker containers:
| Service | Purpose | Image |
|---|---|---|
| core | SHIELD daemon + Vault | Custom (built from source) |
| agent | SHIELD agent + backup plugins | Custom (built from source) |
| postgres | PostgreSQL 16 target | postgres:16-bookworm |
| mariadb | MariaDB 11.4 target | mariadb:11.4 |
| mongodb | MongoDB 7.0 target | mongo:7.0 |
| consul | Consul target | hashicorp/consul:1.22 |
| etcd | etcd target (no TLS) | quay.io/coreos/etcd:v3.6.9 |
| etcd-tls | etcd target (with TLS) | quay.io/coreos/etcd:v3.6.9 |
| rustfs | S3-compatible object store | rustfs/rustfs:latest |
| cert-init | TLS certificate generator | Custom (cfssl) |
| tests | Test runner (errand) | Custom |
For each target database:
-
Initialize test data
-
Configure SHIELD target and backup job
-
Run backup job, verify archive created in S3
-
Verify backup archive is encrypted
-
Corrupt/destroy the data
-
Restore from backup
-
Verify restored data matches original
Phalanx is also a BOSH release that can be deployed via:
bosh create-release --force
bosh upload-release
bosh deploy ci/manifest.yml
bosh run-errand phalanx-testsSee ci/manifest.yml for the deployment manifest.
Note: AWS S3 credentials are only required for BOSH-based testing (the
ci/manifest.ymldeployment). Docker-based tests use RustFS.
docker/ # Docker-based test infrastructure
docker-compose.yml # Service definitions
Makefile # Build/test/clean targets
images/ # Dockerfiles and entrypoints
configs/ # Static configuration files
jobs/ # BOSH jobs (legacy)
packages/ # BOSH packages (legacy)
config/ # BOSH release config (legacy)
ci/ # CI scripts and manifests
Shield is open source software.