Feat: Update tests for pre logbook check and grafana cron job support

This commit is contained in:
xbgmsharp
2023-12-29 18:26:22 +01:00
parent e7d8229e83
commit ce106074dc
3 changed files with 11 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ duration | PT27M
avg_speed | 3.6357142857142852
max_speed | 6.1
max_wind_speed | 22.1
notes | new log note
notes |
extra | {"metrics": {"propulsion.main.runTime": 10}, "observations": {"seaState": -1, "visibility": -1, "cloudCoverage": -1}}
-[ RECORD 2 ]--+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
name | Norra hamnen to Ekenäs
@@ -66,7 +66,7 @@ stay_code | 4
eventlogs_view
-[ RECORD 1 ]
count | 11
count | 14
stats_logs_fn
SELECT 1

View File

@@ -6,11 +6,11 @@
You are now connected to database "signalk" as user "username".
Expanded display is on.
-[ RECORD 1 ]
jobs | 24
jobs | 26
-[ RECORD 1 ]-+-
run_cron_jobs |
-[ RECORD 1 ]----+--
any_pending_jobs | 0
any_pending_jobs | 2

View File

@@ -9,6 +9,11 @@ if [[ -z "${PGSAIL_API_URI}" ]]; then
exit 1
fi
# psql
if [[ ! -x "/usr/bin/psql" ]]; then
apt update && apt -y install postgresql-client
fi
# go install
if [[ ! -x "/usr/bin/go" || ! -x "/root/go/bin/mermerd" ]]; then
#wget -q https://go.dev/dl/go1.21.4.linux-arm64.tar.gz && \
@@ -189,11 +194,11 @@ else
fi
# Generate and update mermaid schema documentation
/root/go/bin/mermerd --runConfig ../ERD/mermerdConfig.yaml
/root/go/bin/mermerd --runConfig ../docs/ERD/mermerdConfig.yaml
echo $?
echo 0
if [ $? -eq 0 ]; then
cp postgsail.md ../ERD/postgsail.md
cp postgsail.md ../docs/ERD/postgsail.md
echo postgsail.md OK
else
echo postgsail.md FAILED