These tests are failing in PG11: ``` *** /home/travis/build/CartoDB/cartodb-postgresql/expected/test/CDB_AnalysisCheckTest.out 2019-05-27 16:09:45.063543994 +0000 --- /home/travis/build/CartoDB/cartodb-postgresql/results/test/CDB_AnalysisCheckTest.out 2019-05-27 16:12:39.770847666 +0000 *************** *** 5,12 **** CREATE TABLE CREATE TABLE CREATE TABLE - (analysis_2f13a3dbd7_41bd92976fc6dd97072afe4ee450054f4c0715d5,public,analysis_2f13a3dbd7_41bd92976fc6dd97072afe4ee450054f4c0715d5) (analysis_2f13a3dbd7_f00cee44e9e6152b450bde3a92eb9ae0d099da94,public,analysis_2f13a3dbd7_f00cee44e9e6152b450bde3a92eb9ae0d099da94) 0 1 --- 5,12 ---- CREATE TABLE CREATE TABLE CREATE TABLE (analysis_2f13a3dbd7_f00cee44e9e6152b450bde3a92eb9ae0d099da94,public,analysis_2f13a3dbd7_f00cee44e9e6152b450bde3a92eb9ae0d099da94) + (analysis_2f13a3dbd7_41bd92976fc6dd97072afe4ee450054f4c0715d5,public,analysis_2f13a3dbd7_41bd92976fc6dd97072afe4ee450054f4c0715d5) 0 1 ``` The reason for that is that they rely on row ordering that cannot be guaranteed as per SQL Standard. Forcing that assumed ordering is enough to get it working again.
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 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