Skip to content

metabase/metabase-qa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Metabase QA

This repository contains:

  • Docker images with pre-populated data for integration testing

Database Configurations

As part of standard QA process, we test different types of database setups:

  • Single schema, single user access
  • Multi schema, single user access
  • Multi schema, multi user access

What this looks like in practice, is we have the following configurations:

  • Metabase Sample Database with a single metabase user
  • Metabase Sample Database + second schema with other random sample data
  • Custom sample data that may or may not be database dependent
    • e.g. Postgres JSON types

Using in Testing

Use Docker images of the form: metabase/qa-databases:{DATABASE}-{QA_TYPE}-{VERSION}

Currently the only supported databases are mongo, postgres and mysql and the only supported "QA type" is sample.

Supported database versions have their own Dockerfile in each directory.

We use a standard set of database names and users for our sample images:

  • Database name: sample
  • Username: metabase
  • Password: metasample123

Listed below are the examples for running each of the supported databases in Docker.

Mongo 4

docker run --rm -p 27017:27017 --name meta-mongo4-sample metabase/qa-databases:mongo-sample-4.0

PostgreSQL 12

docker run --rm -p 5432:5432 --name meta-postgres12-sample metabase/qa-databases:postgres-sample-12

MySQL 8

docker run --rm -p 3306:3306 --name meta-mysql8-sample metabase/qa-databases:mysql-sample-8

Supported Databases and Versions

These images are currently pushed to the public metabase/qa-databases repository:

  • metabase/qa-databases:mongo-sample-4.0
  • metabase/qa-databases:mysql-sample-5.7
  • metabase/qa-databases:mysql-sample-8
  • metabase/qa-databases:postgres-sample-11
  • metabase/qa-databases:postgres-sample-12

Building

Building is manual for now until we support more databases.

Sample Data

For Postgres, sample_data.sql.gz contains the Metabase Sample Database. For Mongo, we extract the sample data from Postgres into files that are then loaded with mongoimport.

Building/Updating Images

To build either the mongo or postgres images, change into the respective directory and execute the build.sh script.

cd dbs/postgres
./build.sh

WARNING: This currently also tries to push the image to Docker Hub, so if you don't have access that part will fail.

If the Sample Database has changed in Postgres, you can run ./update_data.sh in dbs/mongo to update the data files.

References