Skip to content

Commit

Permalink
fix tests after main merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe committed Oct 18, 2024
1 parent 17971a1 commit 4a5ee56
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions x/ccv/provider/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,8 @@ func TestQueryConsumerGenesisTime(t *testing.T) {
defer ctrl.Finish()

consumerId := "0"
initialHeight := clienttypes.Height{RevisionNumber: 0, RevisionHeight: 1}
chainId := "consumer-1"
initialHeight := clienttypes.Height{RevisionNumber: 1, RevisionHeight: 1}
clientId := "07-tendermint-0"
genesisTime := time.Now()
req := &types.QueryConsumerGenesisTimeRequest{
Expand Down Expand Up @@ -802,10 +803,17 @@ func TestQueryConsumerGenesisTime(t *testing.T) {
{
name: "expect error when consumer hasn't been launched yet",
setup: func(ctx sdk.Context, pk keeper.Keeper) {
pk.SetConsumerChainId(
ctx,
consumerId,
chainId,
)
err := pk.SetConsumerInitializationParameters(
ctx,
consumerId,
types.ConsumerInitializationParameters{},
types.ConsumerInitializationParameters{
InitialHeight: initialHeight,
},
)
require.NoError(t, err)
},
Expand All @@ -815,6 +823,11 @@ func TestQueryConsumerGenesisTime(t *testing.T) {
{
name: "expect error when consensus state cannot be found for consumer initial height",
setup: func(ctx sdk.Context, pk keeper.Keeper) {
pk.SetConsumerChainId(
ctx,
consumerId,
chainId,
)
err := pk.SetConsumerInitializationParameters(
ctx,
consumerId,
Expand All @@ -835,6 +848,11 @@ func TestQueryConsumerGenesisTime(t *testing.T) {
{
name: "expect no error when there is a consensus state for the consumer initial height",
setup: func(ctx sdk.Context, pk keeper.Keeper) {
pk.SetConsumerChainId(
ctx,
consumerId,
chainId,
)
err := pk.SetConsumerInitializationParameters(
ctx,
consumerId,
Expand Down

0 comments on commit 4a5ee56

Please sign in to comment.