This is a Haskell interface to Tembo's pgmq PostgreSQL extension.
The API design is based on Elixir PGMQ bindings.
There is a binary located at ./bin/simple-test/Main.hs, which contains all test cases
for the basic module Database.PGMQ.Simple
.
First, choose which container image to use:
export PGMQ_CONTAINER=quay.io/tembo/pg16-pgmq:latest
However, with the above container, some tests might fail because certain functions
throw errors when a table is not present (e.g. pgmq.drop_queue
).
Some fixes are available in our custom repository: https://github.com/garganscript/pgmq and you can use:
export PGMQ_CONTAINER=cgenie/pgmq:16-1.3.3.1
To run the tests, first start a PGMQ container:
podman run --rm --name pgmq -e POSTGRES_PASSWORD=postgres -p 5432:5432 $PGMQ_CONTAINER
or with Docker:
docker run --rm --name pgmq -e POSTGRES_PASSWORD=postgres -p 5432:5432 $PGMQ_CONTAINER
Then, execute the tests:
cabal v2-test
The tests should print debug information and complete without errors.