Skip to content

Commit

Permalink
Fix codecov for e2e: integrate light clients (bp #6196)
Browse files Browse the repository at this point in the history
  • Loading branch information
tnasu committed Dec 23, 2021
1 parent 0643021 commit 4925f8e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
16 changes: 16 additions & 0 deletions light/rpc/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,19 @@ func testOpDecoder(pop tmcrypto.ProofOp) (merkle.ProofOperator, error) {
}
return op, nil
}

func TestDefaultMerkleKeyPathFn(t *testing.T) {
f := DefaultMerkleKeyPathFn()
require.NotNil(t, f)
{
path, err := f("", nil)
require.Error(t, err)
require.Nil(t, path)
}
{
path, err := f("/store/test-merkle-path/key", []byte("test"))
require.NoError(t, err)
require.NotNil(t, path)
require.Equal(t, "/test-merkle-path/test", path.String())
}
}
14 changes: 14 additions & 0 deletions test/e2e/generator/generate_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package main

import (
"math/rand"
"testing"

"github.com/stretchr/testify/require"
)

func TestGenerate(t *testing.T) {
manifests, err := Generate(rand.New(rand.NewSource(randomSeed)))
require.NoError(t, err)
require.NotNil(t, manifests)
}

0 comments on commit 4925f8e

Please sign in to comment.