Skip to content

Commit 745ed4d

Browse files
authored
Add e2e for telemetry middleware (#1399)
This is intended to provide greater test coverage to ensure that our middleware works as expected.
1 parent a4aee31 commit 745ed4d

File tree

2 files changed

+383
-2
lines changed

2 files changed

+383
-2
lines changed

test/e2e/proxy_stdio_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ import (
1616
"github.com/stacklok/toolhive/test/e2e"
1717
)
1818

19+
const (
20+
osvServerName = "osv"
21+
)
22+
1923
func generateUniqueProxyStdioServerName(prefix string) string {
2024
return fmt.Sprintf("%s-%d-%d-%d", prefix, os.Getpid(), time.Now().UnixNano(), GinkgoRandomSeed())
2125
}
@@ -74,7 +78,7 @@ var _ = Describe("Proxy Stdio E2E", Serial, func() {
7478
Context("testing proxy stdio with sse protocol", func() {
7579
BeforeEach(func() {
7680
transportType = types.TransportTypeSSE
77-
mcpServerName = "osv"
81+
mcpServerName = osvServerName
7882
})
7983
It("should proxy MCP requests successfully", func() {
8084
By("Getting OSV server URL")
@@ -124,7 +128,7 @@ var _ = Describe("Proxy Stdio E2E", Serial, func() {
124128
Context("testing proxy stdio with streamable-http protocol", func() {
125129
BeforeEach(func() {
126130
transportType = types.TransportTypeStreamableHTTP
127-
mcpServerName = "osv"
131+
mcpServerName = osvServerName
128132
})
129133

130134
It("should proxy MCP requests successfully", func() {

0 commit comments

Comments
 (0)