Architecture — Testing (testing/)
Docker-based backend integration tests. For system-wide overview, see the root ARCHITECTURE.md.
Structure
testing/
├── test_backends.sh ← orchestrator: runs all or specific backend tests
├── utils.sh ← shared helpers (docker, server start/stop, test assertions)
├── mariadb/ ← MariaDB metadata backend test
├── mysql/ ← MySQL metadata backend test
├── postgres/ ← PostgreSQL metadata backend test
├── mssql/ ← MS SQL Server (disabled — reserved keyword issue)
├── minio/ ← S3-compatible data backend test (MinIO)
├── swift/ ← OpenStack Swift data backend test
└── keycloak/ ← OIDC authentication test (Keycloak) — see [keycloak/ARCHITECTURE.md](keycloak/ARCHITECTURE.md)How It Works
Each backend directory contains:
run.sh— starts/stops docker container, runs testsplikd.cfg— server config pointing at the dockerized backend
Running Tests
bash
make test-backends # All backends
testing/test_backends.sh postgres # Specific backend
testing/test_backends.sh postgres test_name # Specific test
DOCKER_VERSION="XXX" testing/test_backends.sh minio # Specific docker image versionTest Flow
run.sh start— spin up docker container for the backend- Build and start
plikdwith the backend'splikd.cfg - Run the Go e2e test suite from
plik/against the live server (viaPLIKD_CONFIGenv var) run.sh stop— tear down docker container
The actual test code lives in plik/z*_e2e_*_test.go. The testing/ scripts provide the Docker infrastructure to run those same tests against real backends instead of the default in-memory backend. See plik/ARCHITECTURE.md — E2E Test Suite for details on the test infrastructure, server bootstrapping, and what each test file covers.
Backend Coverage
| Backend | Tests | Type |
|---|---|---|
| MariaDB | Metadata CRUD, migrations | Metadata |
| MySQL | Metadata CRUD, migrations | Metadata |
| PostgreSQL | Metadata CRUD, migrations | Metadata |
| MinIO | File upload/download/delete (S3 API) | Data |
| Swift | File upload/download/delete (Swift API) | Data |
| Keycloak | OIDC login/callback flow | Auth |
