From 080d842a03e0ebb5fe2642d2c63228590ae6189c Mon Sep 17 00:00:00 2001 From: Danilo Pantani Date: Tue, 16 Jul 2024 16:15:18 +0200 Subject: [PATCH] fix integartion tests for more than one tx sent --- hermes/integration/app_test.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/hermes/integration/app_test.go b/hermes/integration/app_test.go index 2fc31c24..4590545b 100644 --- a/hermes/integration/app_test.go +++ b/hermes/integration/app_test.go @@ -204,10 +204,7 @@ type ( } QueryPosts struct { - Post []Post `json:"Post"` - Pagination struct { - Total string `json:"total"` - } `json:"pagination"` + Post []Post `json:"Post"` } Post struct { Title string `json:"title"` @@ -600,11 +597,8 @@ func TestCustomIBCTx(t *testing.T) { if err := json.Unmarshal(out, &postResponse); err != nil { return errors.Wrapf(err, "unmarshalling tx response: %s", string(out)) } - if len(postResponse.Post) != 1 { - return errors.Errorf("invalid posts count %d", len(postResponse.Post)) - } - if postResponse.Pagination.Total != "1" { - return errors.Errorf("invalid posts pagination %s", postResponse.Pagination.Total) + if len(postResponse.Post) == 0 { + return errors.New("empty posts count") } if postResponse.Post[0].Title != post.Title { return errors.Errorf("invalid post title: %s, expected: %s", postResponse.Post[0].Title, post.Title)