Skip to main content
Glama
setup-test-env.shโ€ข2.26 kB
#!/bin/bash # Setup test environment and install all dependencies set -e # Exit on error echo "๐Ÿ”ง OPNsense MCP Server - Setup Test Environment" echo "===============================================" echo "" # Check if we're in the project root if [ ! -f "requirements.txt" ]; then echo "โŒ Error: Must be run from project root directory" exit 1 fi # Check for Python if ! command -v python3 &> /dev/null; then echo "โŒ Python 3 is not installed" exit 1 fi PYTHON_VERSION=$(python3 --version | cut -d' ' -f2) echo "โœ… Python version: $PYTHON_VERSION" echo "" # Check for uv if ! command -v uv &> /dev/null; then echo "โš ๏ธ 'uv' package manager not found" echo " Install with: curl -LsSf https://astral.sh/uv/install.sh | sh" echo "" USE_PIP=true else echo "โœ… uv package manager found" USE_PIP=false fi echo "" # Create virtual environment if it doesn't exist if [ ! -d ".venv" ]; then echo "๐Ÿ“ฆ Creating virtual environment..." if [ "$USE_PIP" = true ]; then python3 -m venv .venv else uv venv fi echo "โœ… Virtual environment created" else echo "โœ… Virtual environment exists" fi echo "" # Activate virtual environment echo "๐Ÿ”Œ Activating virtual environment..." source .venv/bin/activate echo "โœ… Virtual environment activated" echo "" # Install dependencies echo "๐Ÿ“ฅ Installing dependencies..." if [ "$USE_PIP" = true ]; then pip install --upgrade pip pip install -r requirements.txt pip install pytest pytest-asyncio pytest-cov else uv pip install -r requirements.txt uv pip install pytest pytest-asyncio pytest-cov fi echo "" echo "โœ… All dependencies installed" echo "" # Verify installation echo "๐Ÿ” Verifying installation..." python -c "import pytest; import pytest_asyncio; import pytest_cov; print('โœ… pytest and plugins installed')" python -c "import src.opnsense_mcp; print('โœ… opnsense_mcp package importable')" echo "" echo "โœ… Test environment setup complete!" echo "" echo "Next steps:" echo " 1. Activate virtual environment:" echo " source .venv/bin/activate" echo "" echo " 2. Run tests:" echo " ./scripts/test.sh" echo " ./scripts/test-coverage.sh" echo " ./scripts/test-quick.sh" echo ""

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/floriangrousset/opnsense-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server