Skip to main content
Glama
integration_case.ex1.31 kB
defmodule HexdocsMcp.IntegrationCase do @moduledoc """ Test case template for integration tests that need to use real implementations instead of mocks. This configures the application to use real implementations for the modules needed by integration tests, and provides isolation by storing/restoring the original configuration. """ use ExUnit.CaseTemplate using do quote do use HexdocsMcp.DataCase, async: false import ExUnit.CaptureIO end end def setup_integration_environment(_context \\ nil) do original_config = %{ ollama_client: Application.get_env(:hexdocs_mcp, :ollama_client), docs_module: Application.get_env(:hexdocs_mcp, :docs_module), mix_deps_module: Application.get_env(:hexdocs_mcp, :mix_deps_module) } Application.put_env(:hexdocs_mcp, :ollama_client, Ollama) Application.put_env(:hexdocs_mcp, :docs_module, HexdocsMcp.Docs) Application.put_env(:hexdocs_mcp, :mix_deps_module, HexdocsMcp.MixDeps) on_exit(fn -> Application.put_env(:hexdocs_mcp, :ollama_client, original_config.ollama_client) Application.put_env(:hexdocs_mcp, :docs_module, original_config.docs_module) Application.put_env(:hexdocs_mcp, :mix_deps_module, original_config.mix_deps_module) end) :ok end end

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/bradleygolden/hexdocs-mcp'

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