feat: expand vehicle data platform capabilities
This commit is contained in:
@@ -29,25 +29,36 @@ tar -C "$new_web" -czf "$fixture/new.tar.gz" .
|
||||
printf 'new platform API\n' > "$fixture/new-platform-api"
|
||||
printf 'new OneOS scope sync\n' > "$fixture/new-oneos-scope-sync"
|
||||
printf 'new reconciliation evaluator\n' > "$fixture/new-reconciliation-evaluator"
|
||||
printf 'new open platform statistics\n' > "$fixture/new-open-platform-stat"
|
||||
printf 'new alert evaluator\n' > "$fixture/new-alert-evaluator"
|
||||
printf 'new alert stream evaluator\n' > "$fixture/new-alert-stream-evaluator"
|
||||
printf 'new alert notification dispatcher\n' > "$fixture/new-alert-notification-dispatcher"
|
||||
|
||||
printf '#!/usr/bin/env bash\nexit 0\n' > "$fixture/bin/systemctl"
|
||||
printf '#!/usr/bin/env bash\nexit 0\n' > "$fixture/bin/curl"
|
||||
printf '#!/usr/bin/env bash\nprintf "mock_verify=ok\\n"\n' > "$fixture/bin/verify"
|
||||
chmod +x "$fixture/bin/"*
|
||||
|
||||
PLATFORM_ROOT="$root" SYSTEMCTL_BIN="$fixture/bin/systemctl" CURL_BIN="$fixture/bin/curl" VERIFY_WEB_RELEASE_BIN="$fixture/bin/verify" RELEASE_HISTORY_LIMIT=3 "$SCRIPT_DIR/install-web-release.sh" new-release "$fixture/new.tar.gz" "$fixture/new-platform-api" "$fixture/new-oneos-scope-sync" "$fixture/new-reconciliation-evaluator" > "$fixture/install.out"
|
||||
PLATFORM_ROOT="$root" SYSTEMCTL_BIN="$fixture/bin/systemctl" CURL_BIN="$fixture/bin/curl" VERIFY_WEB_RELEASE_BIN="$fixture/bin/verify" RELEASE_HISTORY_LIMIT=3 "$SCRIPT_DIR/install-web-release.sh" new-release "$fixture/new.tar.gz" "$fixture/new-platform-api" "$fixture/new-oneos-scope-sync" "$fixture/new-reconciliation-evaluator" "$fixture/new-open-platform-stat" "$fixture/new-alert-evaluator" "$fixture/new-alert-stream-evaluator" "$fixture/new-alert-notification-dispatcher" > "$fixture/install.out"
|
||||
test "$(readlink -f "$root/current")" = "$(cd "$root/releases/new-release" && pwd -P)"
|
||||
grep -q '^PLATFORM_RELEASE=new-release$' "$root/env/platform.env"
|
||||
test "$(cat "$root/current/platform-api")" = 'new platform API'
|
||||
test "$(cat "$root/current/oneos-scope-sync")" = 'new OneOS scope sync'
|
||||
test "$(cat "$root/current/reconciliation-evaluator")" = 'new reconciliation evaluator'
|
||||
test "$(cat "$root/current/alert-evaluator")" = 'old evaluator'
|
||||
test "$(cat "$root/current/open-platform-stat")" = 'new open platform statistics'
|
||||
test -x "$root/current/open-platform-stat"
|
||||
test "$(cat "$root/current/alert-evaluator")" = 'new alert evaluator'
|
||||
test "$(cat "$root/current/alert-stream-evaluator")" = 'new alert stream evaluator'
|
||||
test "$(cat "$root/current/alert-notification-dispatcher")" = 'new alert notification dispatcher'
|
||||
test -x "$root/current/alert-notification-dispatcher"
|
||||
test -f "$root/current/web/assets/new.js"
|
||||
test -f "$root/current/web/assets/old.js"
|
||||
test -f "$root/current/web/.compatibility-manifests/1.assets"
|
||||
test -x "$root/current/deploy/verify-customer-demo.py"
|
||||
test -x "$root/current/deploy/import-source-providers.py"
|
||||
test -f "$root/current/deploy/migrations/017_reconciliation_center.sql"
|
||||
test -f "$root/current/deploy/migrations/036_alert_rule_archive.sql"
|
||||
test -f "$root/current/deploy/migrations/038_daily_pure_hydrogen_mileage.sql"
|
||||
test -f "$root/current/deploy/systemd/lingniu-vehicle-reconciliation-evaluator.timer"
|
||||
test ! -e "$root/current/lingniu-vehicle-platform.service"
|
||||
test "$(find "$root/releases" -mindepth 1 -maxdepth 1 -type d | wc -l | tr -d ' ')" = 3
|
||||
|
||||
Reference in New Issue
Block a user