Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis-tra committed Oct 23, 2024
1 parent 15a220b commit 815a0d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ all: clean build
test:
# maxmind excluded because it requires a database
# discvx excluded because the tests take quite long and are copied from the prysm codebase
go test `go list ./... | grep -v maxmind | grep -v discvx`
go test `go list ./...`

build:
go build -ldflags "-X main.version=${VERSION} -X main.commit=${GIT_SHA} -X main.date=${DATE} -X main.builtBy=${USER}" -o dist/nebula github.com/dennis-tra/nebula-crawler/cmd/nebula
Expand Down
7 changes: 3 additions & 4 deletions discv4/crawler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"testing"

mapset "github.com/deckarep/golang-set/v2"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/stretchr/testify/assert"
)

Expand Down Expand Up @@ -119,11 +118,11 @@ func Test_determineStrategy(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
var sets []mapset.Set[peer.ID]
var sets []mapset.Set[string]
for i, s := range tt.sets {
sets = append(sets, mapset.NewThreadUnsafeSet[peer.ID]())
sets = append(sets, mapset.NewThreadUnsafeSet[string]())
for _, item := range s {
sets[i].Add(peer.ID(item))
sets[i].Add(item)
}
}
got := determineStrategy(sets)
Expand Down

0 comments on commit 815a0d3

Please sign in to comment.