This directory contains comprehensive unit tests for the Fula-OTA system, specifically designed for Armbian/Rockchip3588 deployment after sugarfunge-node removal.
test-config-validation.sh- Validates configuration files for remaining node referencestest-docker-setup.sh- Tests Docker Compose setup and syntax validationtest-container-dependencies.sh- Analyzes container dependencies and startup order
test-fula-sh-functions.sh- Comprehensive testing of fula.sh functions (install, update, run)test-docker-services.sh- Tests Docker services (go-fula, kubo, ipfs-cluster, watchtower)test-uniondrive-readiness.sh- Tests uniondrive service and readiness-check.py script
test-go-fula-system-integration.sh- Enhanced system integration testing for go-fula with WiFi, hotspot, storage, and network connectivity features
From the project root directory:
./test-fula-system-complete.shFrom the project root directory:
./tests/test-config-validation.sh
./tests/test-docker-setup.sh
# ... etc- Safe Testing: All tests use mock commands and temporary directories to avoid modifying the real system
- Comprehensive Coverage: Tests cover Docker services, system scripts, configuration validation, and hardware interactions
- Armbian/Rockchip3588 Specific: Tests include platform-specific features and requirements
- Detailed Reporting: Each test generates detailed logs and reports in
/tmp/fula-test-results/
Test results are stored in:
- Master Log:
/tmp/fula-system-complete-test.log - Individual Logs:
/tmp/fula-test-results/ - Comprehensive Report:
/tmp/fula-test-results/fula-system-test-report.txt
🎯 Primary: Armbian/Rockchip3588
- Full validation of all features
- Hardware-specific testing (GPIO, LED control, WiFi management)
- Real system integration testing
- Production-ready validation
✅ Alternative: Any Linux System (Ubuntu, Debian, etc.)
- Most tests will pass and provide valuable validation
- Docker services testing works fully
- Configuration validation works completely
- System integration tests use mocks for hardware-specific features
- Basic syntax validation only
- Docker Compose validation may work but with different behavior
- System integration tests will fail due to Linux-specific commands
- Not recommended for production validation
| Test Suite | Armbian/RK3588 | Linux | Windows |
|---|---|---|---|
| Config Validation | ✅ Full | ✅ Full | |
| Docker Setup | ✅ Full | ✅ Full | |
| Container Dependencies | ✅ Full | ✅ Full | |
| Fula.sh Functions | ✅ Full | ✅ Mocked | ❌ Fails |
| Docker Services | ✅ Full | ✅ Full | |
| Uniondrive/Readiness | ✅ Full | ✅ Mocked | ❌ Fails |
| System Integration | ✅ Full | ✅ Mocked | ❌ Fails |
Required tools:
bash(Linux shell)dockerpython3
Optional tools (some tests may show warnings if missing):
docker-composesystemctl(Linux service management)nmcli(NetworkManager CLI)
These tests specifically validate that:
- No critical dependencies on sugarfunge-node remain
- All Linux services continue to function properly
- Docker containers start and operate correctly
- System integration features work as expected
- Configuration files are clean of node references
The test suite ensures the Fula-OTA system is ready for deployment on Armbian/Rockchip3588 after the complete removal of sugarfunge-node components.
Usage on device
Remove Locks from hosts if any:
sudo sed -i '/hardening-test-pull-guard/d' /etc/hosts
sudo bash ./tests/test-device-hardening.sh
sudo bash ./tests/test-device-hardening.sh --reboot-prep
sudo bash ./tests/test-device-hardening.sh --verify
sudo bash ./tests/test-device-hardening.sh --build --ota-sim --verify
sudo bash ./tests/test-device-hardening.sh --finish
The script is also registered in test-fula-system-complete.sh as a test suite.
In addition to the shell integration tests above, this directory also holds Python pytest unit tests for the Cloudflare-Workers discovery-API integration that lives inside readiness-check.py.
cd E:\GitHub\fula-ota
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\Activate.ps1 on Windows
pip install -r tests/requirements-test.txtpytest tests/test_canonical_json.py tests/test_kubo_key_loader.py tests/test_relay_drift.py -v-
test_canonical_json.py— the Python_canonical_jsoninreadiness-check.pyproduces byte-identical output to the TypeScriptcanonicalJSONincloudflare/src/verify.ts. Cross-language gate; if it fails, every heartbeat signature mismatches. -
test_kubo_key_loader.py—_load_kubo_ed25519_keyparses a synthetic kubo config with a real libp2p-wrapped ed25519 PrivKey and produces anEd25519PrivateKeywhose public key matches the claimed peer ID. Also tests missing-file and malformed-wire-format failure paths. -
test_relay_drift.py—maybe_refresh_relayscorrectly: skips kubo restart when Workers' list matches on-disk, triggersdocker restart ipfs_hostwhen they differ, silently no-ops when Workers is unreachable, rate-limits withinRELAY_DRIFT_CHECK_INTERVAL_SEC.