mix bier.fixtures.load (bier v0.1.0)

Copy Markdown View Source

Loads the conformance fixture database.

Idempotent. Steps:

  1. Drop and (re)create the bier_test database.
  2. Ensure the postgrest_test_* roles exist (the fixtures also create them idempotently; this is a belt-and-suspenders for shared clusters).
  3. Load spec/conformance/fixtures.sql with psql -v ON_ERROR_STOP=1.
  4. Load spec/conformance/fixtures_local.sql (the human-owned supplement, see spec/conformance/fixtures/README.md) the same way, if present.
  5. Mirror schema test into each pure table/data area schema (operators, ordering, pagination, representations, mutations, headers, config, domain_representations) as auto-updatable views, so requests carrying Accept-Profile: <area> resolve to real exposed schemas.

Connection parameters come from the standard PG* environment variables (see db_config/0).

mix bier.fixtures.load