Update tests, add more invalid metrics to be ignored, add sql metrics count check

This commit is contained in:
xbgmsharp
2023-12-31 21:13:40 +01:00
parent db3bd6b06f
commit c46a428fc2
5 changed files with 67 additions and 5 deletions

View File

@@ -12,9 +12,14 @@ select current_database();
\x on
-- Check the number of process pending
\echo 'Check the number of process pending'
-- Should be 22
SELECT count(*) as jobs from public.process_queue pq where pq.processed is null;
--set role scheduler
SELECT public.run_cron_jobs();
-- Check any pending job
SELECT count(*) as any_pending_jobs from public.process_queue pq where pq.processed is null;
-- Check the number of metrics entries
\echo 'Check the number of metrics entries'
SELECT count(*) as metrics_count from api.metrics;

View File

@@ -5,6 +5,7 @@
You are now connected to database "signalk" as user "username".
Expanded display is on.
Check the number of process pending
-[ RECORD 1 ]
jobs | 26
@@ -14,3 +15,7 @@ run_cron_jobs |
-[ RECORD 1 ]----+--
any_pending_jobs | 2
Check the number of metrics entries
-[ RECORD 1 ]-+----
metrics_count | 172