Skip to content

Test metadata by generating DB images

Maksym Zaporozhets edited this page Jun 14, 2023 · 2 revisions

docker:mysql:test-metadata

Test docker:mysql:generate-metadata and docker:mysql:reconstruct-db.

Description

Test the script that generates DB metadata files by running various containers, generating metadata and reconstructing those DBs. This command will test everything locally without interacting with AWS S3 or pushing image to a registry.

Command log file: var/log/docker_mysql_test_metadata.log

Usage

Example usage:

php bin/dockerizer docker:mysql:test-metadata

Place test database dump here: ./var/tmp/database.sql.gz

How it works

  1. Call composition:build-from-template to generate composition based on the generic_php_apache_app.yaml template.
  2. Run this composition.
  3. Call docker:mysql:generate-metadata to generate metadata file.
  4. Shut down and remove composition.
  5. Mock environment: set DOCKERIZER_AWS_S3_REGION=example-region, DOCKERIZER_AWS_S3_BUCKET=example-bucket, DOCKERIZER_AWS_S3_OBJECT_KEY=metadata.json.
  6. Call docker:mysql:reconstruct-db in the test mode.

Required environment variables

  • DOCKERIZER_SSL_CERTIFICATES_DIR in the docker-compose.yaml - the directory where SSL certificates are stored.

Executes other commands

Clone this wiki locally