e2e

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2025 License: MPL-2.0 Imports: 0 Imported by: 0

README

End To End (e2e) Tests

The purpose of the E2E tests is to have a simple (currently) test that gives maintainers some confidence when adding new resources/tools. It does this by:

  • Building the terraform-mcp-server docker image
  • Running the image
  • Interacting with the server via stdio
  • Issuing requests that interact with the existing Resources/Tools

Running the Tests

A service must be running that supports image building and container creation via the docker CLI.

make test-e2e

Running the tests:

make test-e2e
=== RUN   TestE2E
    e2e_test.go:92: Building Docker image for e2e tests...
    e2e_test.go:38: Starting Stdio MCP client...
=== RUN   TestE2E/Initialize
Initialized with server: terraform-mcp-server test-e2e

=== RUN   TestE2E/CallTool_list_providers
    e2e_test.go:83: Raw response content: aws, google, azurerm, kubernetes, github, docker, null, random
--- PASS: TestE2E (2.30s)
    --- PASS: TestE2E/Initialize (0.55s)
    --- PASS: TestE2E/CallTool_list_providers (0.00s)
PASS
ok      terraform-mcp-server/e2e    2.771s

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentType

type ContentType string
const (
	CONST_TYPE_RESOURCE    ContentType = "resources"
	CONST_TYPE_DATA_SOURCE ContentType = "data-sources"
	CONST_TYPE_GUIDES      ContentType = "guides"
	CONST_TYPE_FUNCTIONS   ContentType = "functions"
	CONST_TYPE_OVERVIEW    ContentType = "overview"
)

type RegistryTestCase

type RegistryTestCase struct {
	TestName        string                 `json:"testName"`
	TestShouldFail  bool                   `json:"testShouldFail"`
	TestDescription string                 `json:"testDescription"`
	TestContentType ContentType            `json:"testContentType,omitempty"`
	TestPayload     map[string]interface{} `json:"testPayload,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL