Skip to content

Add simple e2e test #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025
Merged

Add simple e2e test #330

merged 1 commit into from
Apr 22, 2025

Conversation

williammartin
Copy link
Collaborator

@williammartin williammartin commented Apr 22, 2025

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.

@Copilot Copilot AI review requested due to automatic review settings April 22, 2025 15:36
@williammartin williammartin requested a review from a team as a code owner April 22, 2025 15:36
Copy link
Contributor

@Copilot Copilot AI left a comment

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.

File Description
e2e/e2e_test.go Added e2e tests that build the Docker image, initialize the client, and validate GitHub API responses.
e2e/README.md Added 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
Collaborator Author

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 main Apr 22, 2025
16 checks passed
@williammartin williammartin deleted the wm/add-e2e-test branch April 22, 2025 16:20
@Samido254
Copy link

Impressed 😁

Sign up for free to 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.

3 participants