Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Tests

Quick Start

uv run python demo/setup.py --test      # generate test data
uv run pytest                           # run all 98 tests

Test Sets

uv run pytest --set demo               # demo endpoint tests only
uv run pytest --set federation         # federation tests only

Widget Filtering (federation tests)

Runs core auth/client tests plus one widget group:

uv run pytest --widget metrics
uv run pytest --widget services
uv run pytest --widget reminders
uv run pytest --widget speedtest
uv run pytest --widget network
uv run pytest --widget wiki
uv run pytest --widget schema

Test Coverage

Category Tests
demo (simple, advanced, federation configs) 72
federation core (auth, client, status) 7
metrics (proxy + history + merge) 4
wiki 1
services 2
reminders 2
speedtest 2
network 2
schema (all widgets) 6
Total 98

Test Data

Lives in test/fixtures/{node}/data/, generated by:

uv run python demo/setup.py --test

Metric waveform patterns per node:

  • nas-1: sawtooth
  • nas-2: sine

Interactive Development

python demo/launcher.py --mode federation

Ctrl+C stops all servers.

Browser URLs

URL Description
http://localhost:6100 Central dashboard
http://localhost:6100/api/federation/status Remote health JSON
http://localhost:6601 nas-1 direct (auth required)
http://localhost:6602 nas-2 direct (auth required)

Proxied Widget Endpoints (via central)

Widget nas-1 nas-2
metrics /api/metrics-nas-1 /api/metrics-nas-2
services /api/services-nas-1 /api/services-nas-2
reminders /api/reminders-nas-1 /api/reminders-nas-2
speedtest /api/speedtest-nas-1/history /api/speedtest-nas-2/history
network /api/network-nas-1/log /api/network-nas-2/log
wiki /api/wiki-nas-1/doc /api/wiki-nas-2/doc
merged /api/metrics-combined/history

Schema Endpoints (via proxy)

Widget Endpoint
metrics /api/metrics-nas-1/schema
services /api/services-nas-1/schema
reminders /api/reminders-nas-1/schema
speedtest /api/speedtest-nas-1/schema
network /api/network-nas-1/schema
wiki /api/wiki-nas-1/schema

API Testing

curl -s http://localhost:6100/api/federation/status | jq .

Status Indicators

Open http://localhost:6100 to see the central dashboard. Stop nas-1 and refresh to see the remote indicator turn red.