3 ms·
TAP is fantastic for testing your Postgres database (indexes, views, functions, triggers, etc.) without depending on any specific client language: https://pgtap
by ForHackernews 6y ago
TAP is fantastic for testing your Postgres database (indexes, views, functions, triggers, etc.) without depending on any specific client language: https://pgtap.org/ https://pgtap.org/
- redis_mlc 6y agoPgTAP looks interesting. Can you mention some use cases and interesting things that it caught? The same author also wrote a port for MySQL: https://github.com/hepabolu/mytap https://github.com/hepabolu/mytap
- michelpp 6y agoIt's unit tests for PostgreSQL, so pretty straightforward use cases. I've definitely caught a lot of edges, type confusion, and refactoring opportunities with it. Here are some pgTAP examples from my work: pgsodium: https://github.com/michelp/pgsodium/blob/master/test/test.sql https://github.com/michelp/pgsodium/blob/master/test/test.sq... pgjwt: https://github.com/michelp/pgjwt/blob/master/test.sql https://github.com/michelp/pgjwt/blob/master/test.sql metagration: https://github.com/michelp/metagration/blob/master/test.sql https://github.com/michelp/metagration/blob/master/test.sql