Skip to content

Commit

Permalink
fix unitests
Browse files Browse the repository at this point in the history
  • Loading branch information
omerlavanet committed Dec 8, 2024
1 parent f609af8 commit f6fec7b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions protocol/chainlib/rest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,11 @@ func TestRegexParsing(t *testing.T) {
for _, api := range []string{
"/cosmos/staking/v1beta1/delegations/lava@17ym998u666u8w2qgjd5m7w7ydjqmu3mlgl7ua2/",
} {
_, err := chainParser.ParseMsg(api, nil, http.MethodGet, nil, extensionslib.ExtensionInfo{LatestBlock: 0})
require.Error(t, err)
chainMessage, err := chainParser.ParseMsg(api, nil, http.MethodGet, nil, extensionslib.ExtensionInfo{LatestBlock: 0})
if err == nil {
require.True(t, chainMessage.GetApi().GetName() == "Default-"+api)
} else {
assert.ErrorIs(t, err, common.APINotSupportedError)
}
}
}

0 comments on commit f6fec7b

Please sign in to comment.