Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/e2e/debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"net/http"
"os"
"path/filepath"
"strings"
"testing"
"time"

Expand All @@ -17,6 +18,15 @@ import (

func createDebugTraceRoute(t testTB, env []string, serviceID, routeID, path string, extraFields string) {
t.Helper()
// Inject a default proxy-rewrite to a path go-httpbin always serves so
// waitForDebugTraceRoute can use a non-404 response as the propagation
// signal. Without this every synthetic route path (e.g. /debug-trace-test)
// hits httpbin at the same path, which returns 404 forever, and the wait
// loop cannot distinguish "route not propagated" from "upstream has no
// such path". Callers that supply their own plugins keep them.
if !strings.Contains(extraFields, "plugins") {
extraFields += `, "plugins": {"proxy-rewrite": {"uri": "/anything"}}`
}
Comment thread
shreemaan-abhishek marked this conversation as resolved.
routeJSON := fmt.Sprintf(`{
"id": %q,
"name": %q,
Expand Down
Loading