mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-16 18:57:48 +00:00
Update cron job tests. Add support for autodiscovery
This commit is contained in:
@@ -21,6 +21,9 @@ SELECT v.vessel_id as "vessel_id" FROM auth.vessels v WHERE v.owner_email = 'dem
|
||||
--\echo :"vessel_id"
|
||||
SELECT set_config('vessel.id', :'vessel_id', false) IS NOT NULL as vessel_id;
|
||||
|
||||
-- user_role
|
||||
SET ROLE user_role;
|
||||
|
||||
-- Test logbook for user
|
||||
\echo 'logbook'
|
||||
SELECT count(*) FROM api.logbook WHERE vessel_id = current_setting('vessel.id', false);
|
||||
@@ -38,7 +41,7 @@ SELECT active,name IS NOT NULL AS name,geog,stay_code FROM api.stays WHERE vesse
|
||||
\echo 'eventlogs_view'
|
||||
SELECT count(*) from api.eventlogs_view;
|
||||
|
||||
-- Test event logs view for user
|
||||
-- Test stats logs view for user
|
||||
\echo 'stats_logs_fn'
|
||||
SELECT api.stats_logs_fn(null, null) INTO stats_jsonb;
|
||||
SELECT stats_logs_fn->'name' AS name,
|
||||
|
@@ -11,6 +11,7 @@ user_id | t
|
||||
-[ RECORD 1 ]
|
||||
vessel_id | t
|
||||
|
||||
SET
|
||||
logbook
|
||||
-[ RECORD 1 ]
|
||||
count | 2
|
||||
@@ -66,23 +67,23 @@ stay_code | 4
|
||||
|
||||
eventlogs_view
|
||||
-[ RECORD 1 ]
|
||||
count | 11
|
||||
count | 12
|
||||
|
||||
stats_logs_fn
|
||||
SELECT 1
|
||||
-[ RECORD 1 ]+----------
|
||||
name | "aava"
|
||||
count | 4
|
||||
max_speed | 9.5
|
||||
max_distance | 68.8677
|
||||
max_duration | "PT1H11M"
|
||||
?column? | 3
|
||||
?column? | 90.6030
|
||||
?column? | "PT2H44M"
|
||||
?column? | 44.2
|
||||
?column? | 3
|
||||
?column? | 4
|
||||
?column? | 4
|
||||
-[ RECORD 1 ]+--------
|
||||
name | "kapla"
|
||||
count | 2
|
||||
max_speed | 6.5
|
||||
max_distance | 8.8968
|
||||
max_duration | "PT27M"
|
||||
?column? | 2
|
||||
?column? | 16.5415
|
||||
?column? | "PT47M"
|
||||
?column? | 37.2
|
||||
?column? | 2
|
||||
?column? | 1
|
||||
?column? | 2
|
||||
first_date | t
|
||||
last_date | t
|
||||
|
||||
|
@@ -7,7 +7,7 @@ You are now connected to database "signalk" as user "username".
|
||||
Expanded display is on.
|
||||
Check the number of process pending
|
||||
-[ RECORD 1 ]
|
||||
jobs | 24
|
||||
jobs | 26
|
||||
|
||||
-[ RECORD 1 ]-+-
|
||||
run_cron_jobs |
|
||||
|
Reference in New Issue
Block a user