Skip to main content
Glama

adx-mcp-server

MIT License
48
  • Linux
  • Apple
test_config.py1.5 kB
#!/usr/bin/env python import pytest import os from adx_mcp_server.server import config, ADXConfig class TestConfig: def test_config_initialization(self, monkeypatch): """Test that config is initialized correctly from environment variables.""" # Set environment variables monkeypatch.setenv("ADX_CLUSTER_URL", "https://testcluster.region.kusto.windows.net") monkeypatch.setenv("ADX_DATABASE", "testdb") # Re-initialize the config to pick up the environment variables test_config = ADXConfig( cluster_url=os.environ.get("ADX_CLUSTER_URL", ""), database=os.environ.get("ADX_DATABASE", ""), ) # Verify the config values assert test_config.cluster_url == "https://testcluster.region.kusto.windows.net" assert test_config.database == "testdb" def test_missing_config(self, monkeypatch): """Test that config handles missing environment variables.""" # Clear environment variables for var in ["ADX_CLUSTER_URL", "ADX_DATABASE"]: monkeypatch.delenv(var, raising=False) # Re-initialize the config with empty environment test_config = ADXConfig( cluster_url=os.environ.get("ADX_CLUSTER_URL", ""), database=os.environ.get("ADX_DATABASE", ""), ) # Verify the config values are empty assert test_config.cluster_url == "" assert test_config.database == ""

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/pab1it0/adx-mcp-server'

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