Testing and Evidence Collection¶
The edge-llm-tests repository provides a comprehensive test suite to validate the functionality, performance, and security of the Edge Computing LLM platform. It also generates sanitized evidence for compliance and auditing.
Test Modes¶
The test suite can be executed in three primary modes:
1. Repository Mode¶
Tests individual components locally without requiring a full Kubernetes cluster. Useful for unit tests, configuration validation, and pre-commit checks.
2. Cluster Mode¶
Runs integration and end-to-end tests against a live, deployed cluster. Validates Kubernetes resources, network policies, GPU allocation, and service connectivity.
[!IMPORTANT] Cluster mode requires a valid
KUBECONFIGpointing to a cluster with the platform fully deployed (edge-cli applycompleted).
3. All Mode¶
Runs both repository and cluster tests sequentially.
Environment Variables¶
The test suite relies on environment variables, particularly for testing specific model profiles (GGUF):
TEST_GGUF_PROFILE: Specifies the profile to test (e.g.,lite,standard,heavy).TEST_OLLAMA_ENDPOINT: Overrides the default Ollama service endpoint.TEST_TIMEOUT: Sets the maximum duration for long-running tests (default: 300s).
Example:
Running Focused Test Suites¶
You can run specific test suites to narrow down failures or validate specific areas:
# Run only GPU validation tests
./run-tests.sh --mode cluster --suite gpu
# Run observability stack tests (Prometheus, Grafana)
./run-tests.sh --mode cluster --suite observability
# Run application tests (Open WebUI connectivity)
./run-tests.sh --mode cluster --suite webui
Sanitized Evidence Output¶
When tests complete, they generate evidence artifacts in the evidence/ directory. For privacy and security, this output is sanitized to remove sensitive information (e.g., real IP addresses, personal usernames, raw API keys).
Evidence Schema (JSON)¶
{
"timestamp": "2023-10-27T10:00:00Z",
"environment": "k3s-edge",
"profile": "standard",
"tests": [
{
"name": "gpu-operator-ready",
"status": "PASS",
"duration_ms": 150,
"output_sanitized": "daemonset/nvidia-device-plugin-daemonset is ready"
},
{
"name": "ollama-model-load",
"status": "PASS",
"duration_ms": 4500,
"details": {
"model": "llama3:8b",
"vram_usage_mb": 4800
}
}
],
"summary": {
"total": 45,
"passed": 45,
"failed": 0,
"skipped": 0
}
}
Interpreting Results¶
- PASS: The component meets all expected criteria.
- FAIL: A critical assertion failed. Review the
output_sanitizedfield for details. - SKIP: The test was skipped, often because a prerequisite was not met (e.g., trying to run a
heavyprofile test on a 8GB VRAM GPU).
Troubleshooting Test Failures¶
- Check Pod Logs: If a cluster test fails, use
kubectl logsin the relevant namespace (gpu-operatororllm-observability). - Verify Resources: Ensure the node has sufficient CPU/Memory/VRAM. Run
edge-cli doctor. - Network Policies: If connectivity tests fail, check if Calico or standard NetworkPolicies are blocking traffic.