Skip to content

Commit

Permalink
add black box testing for file
Browse files Browse the repository at this point in the history
  • Loading branch information
walldiss committed May 29, 2024
1 parent 1e7a637 commit cd888d8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions share/store/file/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ package file
import (
"context"
"fmt"
"github.com/celestiaorg/celestia-node/share/eds/edstest"
"github.com/celestiaorg/celestia-node/share/sharetest"
"github.com/stretchr/testify/require"
mrand "math/rand"
"strconv"
"sync"
"testing"

"github.com/stretchr/testify/require"

"github.com/celestiaorg/nmt"
"github.com/celestiaorg/rsmt2d"

"github.com/celestiaorg/celestia-node/share"
"github.com/celestiaorg/celestia-node/share/eds/edstest"
"github.com/celestiaorg/celestia-node/share/sharetest"
)

type createFile func(eds *rsmt2d.ExtendedDataSquare) EdsFile
Expand Down Expand Up @@ -54,7 +55,8 @@ func testShare(t *testing.T,
fl EdsFile,
eds *rsmt2d.ExtendedDataSquare,

Check warning on line 56 in share/store/file/testing.go

View workflow job for this annotation

GitHub Actions / go-ci / Lint

unused-parameter: parameter 'eds' seems to be unused, consider removing or renaming it as _ (revive)
dah *share.Root,
x, y int) {
x, y int,
) {
shr, err := fl.Share(context.TODO(), x, y)
require.NoError(t, err)

Expand Down Expand Up @@ -202,9 +204,7 @@ func benchGetShareFromFile(b *testing.B, newFile func(size int) EdsFile, minSize

type quadrant int

Check failure on line 205 in share/store/file/testing.go

View workflow job for this annotation

GitHub Actions / go-ci / Lint

type `quadrant` is unused (unused)

var (
quadrants = []quadrant{1, 2, 3, 4}
)
var quadrants = []quadrant{1, 2, 3, 4}

Check failure on line 207 in share/store/file/testing.go

View workflow job for this annotation

GitHub Actions / go-ci / Lint

var `quadrants` is unused (unused)

func (q quadrant) String() string {

Check failure on line 209 in share/store/file/testing.go

View workflow job for this annotation

GitHub Actions / go-ci / Lint

func `quadrant.String` is unused (unused)
return strconv.Itoa(int(q))
Expand Down

0 comments on commit cd888d8

Please sign in to comment.