From fdd6fc18e11848463f3e2a1c2a061413cb0559a3 Mon Sep 17 00:00:00 2001 From: xbgmsharp Date: Wed, 25 Oct 2023 12:08:11 +0200 Subject: [PATCH] Update logbook tests, no more track_gpx field --- tests/sql/cron_post_jobs.sql | 8 +++++++- tests/sql/cron_post_jobs.sql.output | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/sql/cron_post_jobs.sql b/tests/sql/cron_post_jobs.sql index 8230df1..e9357a6 100644 --- a/tests/sql/cron_post_jobs.sql +++ b/tests/sql/cron_post_jobs.sql @@ -25,7 +25,7 @@ SELECT set_config('vessel.id', :'vessel_id', false) IS NOT NULL as vessel_id; \echo 'logbook' SELECT count(*) FROM api.logbook WHERE vessel_id = current_setting('vessel.id', false); \echo 'logbook' -SELECT name,_from_time IS NOT NULL AS _from_time,_to_time IS NOT NULL AS _to_time, track_geojson IS NOT NULL AS track_geojson, track_gpx IS NOT NULL AS track_gpx, track_geom, distance,duration,avg_speed,max_speed,max_wind_speed,notes,extra FROM api.logbook WHERE vessel_id = current_setting('vessel.id', false); +SELECT name,_from_time IS NOT NULL AS _from_time,_to_time IS NOT NULL AS _to_time, track_geojson IS NOT NULL AS track_geojson, track_geom, distance,duration,avg_speed,max_speed,max_wind_speed,notes,extra FROM api.logbook WHERE vessel_id = current_setting('vessel.id', false); -- Test stays for user \echo 'stays' @@ -63,3 +63,9 @@ SELECT api.stats_logs_fn('2022-01-01'::text,'2022-06-12'::text); SELECT extra FROM api.logbook l WHERE id = 1 AND vessel_id = current_setting('vessel.id', false); SELECT api.update_logbook_observations_fn(1, '{"observations":{"cloudCoverage":1}}'::TEXT); SELECT extra FROM api.logbook l WHERE id = 1 AND vessel_id = current_setting('vessel.id', false); + +-- Check export +--\echo 'check logbook export fn' +--SELECT api.export_logbook_geojson_fn(1); +--SELECT api.export_logbook_gpx_fn(1); +--SELECT api.export_logbook_kml_fn(1); diff --git a/tests/sql/cron_post_jobs.sql.output b/tests/sql/cron_post_jobs.sql.output index 35669fb..35a65a2 100644 --- a/tests/sql/cron_post_jobs.sql.output +++ b/tests/sql/cron_post_jobs.sql.output @@ -21,7 +21,6 @@ name | Bollsta to Slottsbacken _from_time | t _to_time | t track_geojson | t -track_gpx | t track_geom | 0102000020E61000001A00000020D26F5F0786374030BB270F0B094E400C6E7ED60F843740AA60545227084E40D60FC48C03823740593CE27D42074E407B39D9F322803740984C158C4A064E4091ED7C3F357E3740898BB63D54054E40A8A1208B477C37404BA3DC9059044E404C5CB4EDA17A3740C4F856115B034E40A9A44E4013793740D8F0F44A59024E40E4839ECDAA773740211FF46C56014E405408D147067637408229F03B73004E40787AA52C43743740F90FE9B7AFFF4D40F8098D4D18723740C217265305FF4D4084E82303537037409A2D464AA0FE4D4022474DCE636F37402912396A72FE4D408351499D806E374088CFB02B40FE4D4076711B0DE06D3740B356C7040FFE4D404EAC66B0BC6E374058A835CD3BFE4D40D7A3703D0A6F3740D3E10EC15EFE4D4087602F277B6E3740A779C7293AFE4D4087602F277B6E3740A779C7293AFE4D402063EE5A426E3740B5A679C729FE4D40381DEE10EC6D37409ECA7C1A0AFE4D40E2C46A06CB6B37400A43F7BF36FD4D4075931804566E3740320BDAD125FD4D409A2D464AA06E37404A5658830AFD4D40029A081B9E6E37404A5658830AFD4D40 distance | 7.17 duration | PT25M @@ -35,7 +34,6 @@ name | Knipan to Ekenäs _from_time | t _to_time | t track_geojson | t -track_gpx | t track_geom | 0102000020E6100000130000004806A6C0EF6C3740DA1B7C6132FD4D40FE65F7E461693740226C787AA5FC4D407DD3E10EC1663740B29DEFA7C6FB4D40898BB63D5465374068479724BCFA4D409A5271F6E1633740B6847CD0B3F94D40431CEBE236623740E9263108ACF84D402C6519E2585F37407E678EBFC7F74D4096218E75715B374027C5B45C23F74D402AA913D044583740968DE1C46AF64D405AF5B9DA8A5537407BEF829B9FF54D407449C2ABD253374086C954C1A8F44D407D1A0AB278543740F2B0506B9AF34D409D11A5BDC15737406688635DDCF24D4061C3D32B655937402CAF6F3ADCF14D408988888888583740B3319C58CDF04D4021FAC8C0145837408C94405DB7EF4D40B8F9593F105B37403DC0804BEDEE4D40DE4C5FE2A25D3740AE47E17A14EE4D40DE4C5FE2A25D3740AE47E17A14EE4D40 distance | 8.6862 duration | PT18M