Skip to content

Add simple e2e test - #330

Merged
williammartin merged 1 commit into
mainfrom
wm/add-e2e-test
Apr 22, 2025
Merged

Add simple e2e test#330
williammartin merged 1 commit into
mainfrom
wm/add-e2e-test

Conversation

@williammartin

@williammartinwilliammartin commented Apr 22, 2025

Copy link
Copy Markdown
Collaborator

Description

Whilst reviewing dependabot updates, I really wanted a fast way to build a Docker image, start the server, call a tool and validate the result, as opposed to doing it manually.

The primary audience for the current e2e test is myself, and any other maintainer, and in future possibly other contributors. See the readme for some limitations on the approach, which is why I don't necessarily want to make all contributors first class audience, though there's no reason that it couldn't be used.

The implementation is pretty MVP, and that's also intentional, until we see if and where it provides value.

CopilotAI review requested due to automatic review settings April 22, 2025 15:36
@williammartin
williammartin requested a review from a team as a code ownerApril 22, 2025 15:36

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a basic end-to-end (e2e) test to simplify validation of the MCP server Docker image and its GitHub API integration. Key changes include:

  • A new e2e test written in Go to verify server initialization and the "get_me" tool.
  • A helper function to build the Docker image before running tests.
  • Documentation updates in the README on how to run the e2e tests.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

FileDescription
e2e/e2e_test.goAdded e2e tests that build the Docker image, initialize the client, and validate GitHub API responses.
e2e/README.mdAdded documentation on the purpose and usage of the e2e tests.
Comments suppressed due to low confidence (1)

e2e/e2e_test.go:84

  • Consider renaming this new GitHub API client variable (for example, to ghClient) to avoid shadowing the existing 'client' variable, improving code clarity.
client := github.NewClient(nil).WithAuthToken(e2eServerToken)

toby
toby previously approved these changes Apr 22, 2025
@williammartin

Copy link
Copy Markdown
CollaboratorAuthor

Bypassing codeowner review rule because the only change I made after review from @toby was to expand e2e to End to End in the README.

@williammartin
williammartin merged commit 56b23c3 into mainApr 22, 2025
@williammartin
williammartin deleted the wm/add-e2e-test branch April 22, 2025 16:20
@Samido254

Copy link
Copy Markdown

Impressed 😁

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@williammartin@Samido254@toby