From a40dc8cf3cab685a81ff9c245774a0820618a8f6 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Mon, 3 Feb 2025 20:05:30 +0100 Subject: [PATCH] cleanup: --- acceptance/bundle/scripts/test.toml | 1 - libs/testserver/server.go | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/acceptance/bundle/scripts/test.toml b/acceptance/bundle/scripts/test.toml index 02e9f423c..1dbd78681 100644 --- a/acceptance/bundle/scripts/test.toml +++ b/acceptance/bundle/scripts/test.toml @@ -1,2 +1 @@ LocalOnly = true # Deployment currently fails when run locally; once that is fixed, remove this setting - diff --git a/libs/testserver/server.go b/libs/testserver/server.go index a51ef6f54..e73b4f565 100644 --- a/libs/testserver/server.go +++ b/libs/testserver/server.go @@ -54,7 +54,7 @@ your test. You can copy the following snippet in your test.toml file: [[Server]] Pattern = %s %s Response = ''' - + '''`, req.Method, req.URL.Path) s.t.Fatalf(msg) @@ -89,6 +89,7 @@ func (s *Server) Handle(pattern string, handler HandlerFunc) { var reqBody any if len(body) > 0 && body[0] == '{' { + // serialize the body as is, if it's JSON reqBody = json.RawMessage(body) } else { reqBody = string(body)