This epic covers the implementation of end-to-end integration tests for Greenmask v1, focused on validating real dump–restore workflows and ensuring data integrity across supported features. The goal is to introduce a stable, reproducible E2E test suite that reflects real user scenarios and can be safely extended as new functionality is added.
The tests will be implemented as part of the existing input-output test suite and will rely on pytest with allure reporting. Each test follows a full workflow: preparing the source database, generating a valid Greenmask configuration, running dump and restore commands, and validating the results directly against the destination database using SQL queries.
The test environment is expected to be fully containerized and reproducible. It includes source and destination MySQL instances, an S3-compatible storage (MinIO) for dumps, a compiled Greenmask v1 binary, and a helper for generating configuration files that match the real schema used in production.
The epic prioritizes E2E coverage over unit-level assertions. All validations are performed against the restored database state to ensure schema correctness, referential integrity, and transformation accuracy.
The initial scope of testing includes:
- Table and schema inclusion/exclusion logic
- Subsetting with and without references, including complex reference chains, nullable FKs, and multiple conditions
- Core transformers (hash, replace) including chaining, global salt usage, and conditional application via scopes
- Configuration features
- Known limitations captured as expected failures (XFAIL), including strict type overrides and reference-aware transformer application
Special attention is given to referential integrity, topological restore order, and deterministic behavior of transformations. Tests are designed to run in parallel where possible, with isolated databases or schemas to avoid cross-test interference.
Overall, this epic establishes a foundation for regression-safe development of Greenmask v1 by validating its behavior through realistic, production-like scenarios rather than isolated components.
This epic covers the implementation of end-to-end integration tests for Greenmask v1, focused on validating real dump–restore workflows and ensuring data integrity across supported features. The goal is to introduce a stable, reproducible E2E test suite that reflects real user scenarios and can be safely extended as new functionality is added.
The tests will be implemented as part of the existing input-output test suite and will rely on pytest with allure reporting. Each test follows a full workflow: preparing the source database, generating a valid Greenmask configuration, running dump and restore commands, and validating the results directly against the destination database using SQL queries.
The test environment is expected to be fully containerized and reproducible. It includes source and destination MySQL instances, an S3-compatible storage (MinIO) for dumps, a compiled Greenmask v1 binary, and a helper for generating configuration files that match the real schema used in production.
The epic prioritizes E2E coverage over unit-level assertions. All validations are performed against the restored database state to ensure schema correctness, referential integrity, and transformation accuracy.
The initial scope of testing includes:
Special attention is given to referential integrity, topological restore order, and deterministic behavior of transformations. Tests are designed to run in parallel where possible, with isolated databases or schemas to avoid cross-test interference.
Overall, this epic establishes a foundation for regression-safe development of Greenmask v1 by validating its behavior through realistic, production-like scenarios rather than isolated components.