Fix simulate.py error import and update edge island leave command syntax
Some checks failed
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Has been cancelled
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Some checks failed
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Has been cancelled
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
- simulate.py: Import error function from utils with fallback implementation - test_edge_advanced.sh: Remove --island-id flag from island leave commands (use positional argument) - conftest.py: Add tests directory to Python path for test discovery
This commit is contained in:
@@ -16,11 +16,13 @@ import os
|
|||||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from utils import output, setup_logging
|
from utils import output, error, setup_logging
|
||||||
from config import get_config
|
from config import get_config
|
||||||
except ImportError:
|
except ImportError:
|
||||||
def output(msg, format_type):
|
def output(msg, format_type):
|
||||||
click.echo(msg)
|
click.echo(msg)
|
||||||
|
def error(msg):
|
||||||
|
click.echo(f"Error: {msg}")
|
||||||
def setup_logging(verbose, debug):
|
def setup_logging(verbose, debug):
|
||||||
return "INFO"
|
return "INFO"
|
||||||
def get_config(config_file=None, role=None):
|
def get_config(config_file=None, role=None):
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ log_info "Starting edge advanced CLI integration tests"
|
|||||||
log_info "Edge API URL: $EDGE_URL"
|
log_info "Edge API URL: $EDGE_URL"
|
||||||
|
|
||||||
# Island advanced operations
|
# Island advanced operations
|
||||||
run_test "Island leave" "aitbc edge island leave --island-id test_island_123" "true"
|
run_test "Island leave" "aitbc edge island leave test_island_123" "true"
|
||||||
|
|
||||||
run_test "Island bridge" "aitbc edge island bridge --source island_a --target island_b" "true"
|
run_test "Island bridge" "aitbc edge island bridge --source island_a --target island_b" "true"
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ run_test "Metrics get" "aitbc edge metrics get_metric --metric-id metric_123" "t
|
|||||||
run_test "Metrics delete" "aitbc edge metrics delete_metric --metric-id metric_123" "true"
|
run_test "Metrics delete" "aitbc edge metrics delete_metric --metric-id metric_123" "true"
|
||||||
|
|
||||||
# Error handling tests (should handle gracefully)
|
# Error handling tests (should handle gracefully)
|
||||||
run_test "Island leave nonexistent" "aitbc edge island leave --island-id nonexistent_island" "false"
|
run_test "Island leave nonexistent" "aitbc edge island leave nonexistent_island" "false"
|
||||||
|
|
||||||
run_test "GPU get nonexistent" "aitbc edge gpu get_gpu --gpu-id nonexistent_gpu" "false"
|
run_test "GPU get nonexistent" "aitbc edge gpu get_gpu --gpu-id nonexistent_gpu" "false"
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from pathlib import Path
|
|||||||
# Configure Python path for test discovery
|
# Configure Python path for test discovery
|
||||||
project_root = Path(__file__).parent.parent
|
project_root = Path(__file__).parent.parent
|
||||||
sys.path.insert(0, str(project_root))
|
sys.path.insert(0, str(project_root))
|
||||||
|
sys.path.insert(0, str(project_root / "tests"))
|
||||||
|
|
||||||
# Import fixtures from dedicated fixture files
|
# Import fixtures from dedicated fixture files
|
||||||
# Common fixtures (environment setup, data generators)
|
# Common fixtures (environment setup, data generators)
|
||||||
|
|||||||
Reference in New Issue
Block a user