mirror of
https://github.com/aljazceru/crawler_v2.git
synced 2025-12-18 16:04:21 +01:00
using config specific kinds instead of global variable
This commit is contained in:
@@ -28,15 +28,15 @@ func TestFirehose(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFetch(t *testing.T) {
|
||||
pool := nostr.NewSimplePool(ctx)
|
||||
pubkeys := []string{odell, calle, pip}
|
||||
config := NewFetcherConfig()
|
||||
|
||||
events, err := fetch(ctx, pool, defaultRelays, pubkeys)
|
||||
events, err := fetch(ctx, config, pubkeys)
|
||||
if err != nil {
|
||||
t.Fatalf("expected error nil, got %v", err)
|
||||
}
|
||||
|
||||
expected := len(pubkeys) * len(Kinds)
|
||||
expected := len(pubkeys) * 2
|
||||
if len(events) != expected {
|
||||
t.Fatalf("expected %d events, got %d", expected, len(events))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user