Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix integartion tests for more than one tx sent
Browse files Browse the repository at this point in the history
Pantani committed Jul 16, 2024
1 parent 1aba755 commit 080d842
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions hermes/integration/app_test.go
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 080d842

Please sign in to comment.