cartodb-postgresql/test/README

24 lines
860 B
Plaintext
Raw Normal View History

2014-06-04 16:40:18 +08:00
Adding tests consists in adding 2 files in this directory: one file
containing the sql code and another containing the expected output.
Example, to add a test for CDB_Something function, you'd add:
- CDB_SomethingTest.sql
- CDB_SomethingTest_expect
2019-07-04 23:53:11 +08:00
In case you need multiple expects of a test for different versions you have
to add .pg$(VERSION) at the end of the file.
For example if you want an expect file for PG11 you need to have two expect files:
- CDB_SomethingTest_expect
- CDB_SomethingTest_expect.pg11
2014-06-04 16:40:18 +08:00
To easy the generation of the expected file you can initially omit it,
then run "make -C .. installcheck" from the top-level dir and copy
../results/test/CDB_SomethingTest.out to CDB_SomethingTest_expect chopping
off the first line:
make -C .. installcheck
tail -n +2 ../results/test/CDB_SomethingTest.out > CDB_SomethingTest_expect