-
Notifications
You must be signed in to change notification settings - Fork 149
Centralize container image references in e2e tests #2811
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
Open
4t8dd
wants to merge
1
commit into
stacklok:main
Choose a base branch
from
4t8dd:issue-2786-centralize-e2e-images
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+62
−13
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| // Package images provides centralized container image references for e2e tests. | ||
| // This package serves as a single source of truth for all container images used | ||
| // in end-to-end testing, making it easier to maintain versions and enabling | ||
| // automated dependency updates through tools like Renovate. | ||
| // | ||
| // Each image is composed of an imageURL (base path) and imageTag (version). | ||
| // The complete Image constant combines the URL and tag for use in tests. | ||
| package images | ||
|
|
||
| const ( | ||
| yardstickServerImageURL = "ghcr.io/stackloklabs/yardstick/yardstick-server" | ||
| yardstickServerImageTag = "0.0.2" | ||
| // YardstickServerImage is used in operator tests across multiple transport protocols | ||
| // (stdio, SSE, streamable-http) and tenancy modes. | ||
| // Note: This image is also referenced in 8 YAML fixture files under | ||
| // test/e2e/chainsaw/operator/. Those files are declarative Kubernetes manifests | ||
| // and cannot import Go constants directly. | ||
| YardstickServerImage = yardstickServerImageURL + ":" + yardstickServerImageTag | ||
|
|
||
| gofetchServerImageURL = "ghcr.io/stackloklabs/gofetch/server" | ||
| gofetchServerImageTag = "1.0.1" | ||
| // GofetchServerImage is used for testing virtual MCP server features, including | ||
| // authentication flows and backend aggregation. | ||
| GofetchServerImage = gofetchServerImageURL + ":" + gofetchServerImageTag | ||
|
|
||
| osvmcpServerImageURL = "ghcr.io/stackloklabs/osv-mcp/server" | ||
| osvmcpServerImageTag = "0.0.7" | ||
| // OSVMCPServerImage is used for testing discovered mode aggregation and telemetry | ||
| // metrics validation. | ||
| OSVMCPServerImage = osvmcpServerImageURL + ":" + osvmcpServerImageTag | ||
|
|
||
| pythonImageURL = "python" | ||
| pythonImageTag = "3.9-slim" | ||
| // PythonImage is used for deploying mock OIDC servers and instrumented backend servers | ||
| // in Kubernetes tests. These run Flask-based Python services for testing authentication flows. | ||
| PythonImage = pythonImageURL + ":" + pythonImageTag | ||
|
|
||
| curlImageURL = "curlimages/curl" | ||
| curlImageTag = "latest" | ||
| // CurlImage is used to query service endpoints and gather statistics during Kubernetes tests. | ||
| CurlImage = curlImageURL + ":" + curlImageTag | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,13 +14,14 @@ import ( | |
| "k8s.io/apimachinery/pkg/types" | ||
|
|
||
| mcpv1alpha1 "github.com/stacklok/toolhive/cmd/thv-operator/api/v1alpha1" | ||
| "github.com/stacklok/toolhive/test/e2e/images" | ||
| ) | ||
|
|
||
| // Compile-time check to ensure corev1 is used (for Service type) | ||
| var _ = corev1.ServiceSpec{} | ||
|
|
||
| // YardstickImage is the container image for the yardstick MCP server | ||
| const YardstickImage = "ghcr.io/stackloklabs/yardstick/yardstick-server:0.0.2" | ||
| const YardstickImage = images.YardstickServerImage | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we could get away with this constant now and use |
||
|
|
||
| var _ = Describe("VirtualMCPServer Yardstick Base", Ordered, func() { | ||
| var ( | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a follow-up, could we migrate from using latest and pin to a version?