From 9c009f9559c8fb4c7d0308fee6628f07c34f8d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Eckel?= Date: Thu, 20 Jun 2024 12:12:12 +0200 Subject: [PATCH] fixed test case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Eckel --- service/router.go | 2 +- service/router_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service/router.go b/service/router.go index 9310179..9744ac5 100644 --- a/service/router.go +++ b/service/router.go @@ -137,7 +137,7 @@ func (s *TAAService) createAccount(c *gin.Context) { err = s.pmc.FundAccount(requestBody.PlmntAddress) if err != nil { s.logger.Error("msg", "failed to send funds ", "address", requestBody.PlmntAddress, "error", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) + c.JSON(http.StatusInternalServerError, gin.H{"error": "failed to send funds: " + err.Error()}) return } diff --git a/service/router_test.go b/service/router_test.go index 0292fde..127d8e6 100644 --- a/service/router_test.go +++ b/service/router_test.go @@ -147,7 +147,7 @@ func TestPostCreateAccount(t *testing.T) { Signature: "DE97AEF2A99B9371882C4639A607A11AF2BA8AE520FF7B28203193F5EB63AE1670D431960C3103682901A8F5B3C542139DCF8FB44F97780FC8D8A45F8A4E59E3", PlmntAddress: "otherPlmntAddr", }, - resBody: "{\"error\":\"failed to send funds\"}", + resBody: "{\"error\":\"failed to send funds: some err\"}", code: 500, mocker: func(t *testing.T) *testutil.MockIPlanetmintClient { ctrl := gomock.NewController(t)