diff --git a/test/extension/test.sh b/test/extension/test.sh index 54c2c50..62704ee 100755 --- a/test/extension/test.sh +++ b/test/extension/test.sh @@ -586,6 +586,12 @@ test_extension|public|"local-table-with-dashes"' sql postgres "SELECT cartodb.CDB_Last_Updated_Time(ARRAY['test_extension.public.\"local-table-with-dashes\"']::text[]) < now()" should 't' sql postgres "SELECT cartodb.CDB_Last_Updated_Time(ARRAY['test_extension.public.\"local-table-with-dashes\"']::text[]) > (now() - interval '1 minute')" should 't' + # Check CDB_Get_Foreign_Updated_At is robust to unimported CDB_TableMetadata + sql postgres "DROP FOREIGN TABLE IF EXISTS test_fdw.cdb_tablemetadata;" + sql postgres "SELECT cartodb.CDB_Get_Foreign_Updated_At('test_fdw.foo') < (now() + interval '1 minute')" should 't' + sql postgres "SELECT cartodb.CDB_Get_Foreign_Updated_At('test_fdw.foo') > (now() - interval '1 minute')" should 't' + + # Teardown DATABASE=fdw_target sql postgres 'REVOKE USAGE ON SCHEMA test_fdw FROM fdw_user;' DATABASE=fdw_target sql postgres 'REVOKE SELECT ON test_fdw.foo FROM fdw_user;' DATABASE=fdw_target sql postgres 'REVOKE SELECT ON test_fdw.foo2 FROM fdw_user;'