cockroachdb / cockroach

CockroachDB - the open source, cloud-native distributed SQL database.
https://www.cockroachlabs.com
Other
29.4k stars 3.68k forks source link

roachtest: add orm test for PostgREST #72312

Open otan opened 2 years ago

otan commented 2 years ago

Add an ORM test for PostgREST.

Failures (as of 3rd Nov): https://gist.github.com/otan/d5960f37efb1b475e81b1007dd36aff3 Nathan's commit to fix some unsupported features: https://github.com/nvanbenschoten/postgrest/commit/6069fda417e905931e4e53d362c34e278069bd43


Hard Blockers


Running instructions

1) First, you'll need to git clone PostgREST and set up the development environment.

We use Nix for managing our dependencies and to avoid building all the dependencies from scratch we use Cachix. All of this is documented here:

https://github.com/PostgREST/postgrest/tree/main/nix#getting-started-with-nix

You can get the tools' download links there. To check all's good, doing a postgrest-run should show the usage message.

2) Setup the test database fixtures.

Just saw that CockroachDB supports the \i and \ir slash commands. Really cool!

With that, setting up the fixtures should be a matter of connecting to the db and running

\i test/fixtures/load.sql

I assume there will be some errors, mostly because we create extensions such as pgcrypto. For now, I'd suggest commenting out the lines that give errors.

3) Run PostgREST test suite

PGRST_DB_URI="<your_db_connection_string>" postgrest-test-spec

Finished in 58.8993 seconds
773 examples, 0 failures, 1 pending

Epic CRDB-10300

Jira issue: CRDB-11089

blathers-crl[bot] commented 2 years ago

Hi @otan, please add a C-ategory label to your issue. Check out the label system docs.

While you're here, please consider adding an A- label to help keep our repository tidy.

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.