forked from erigontech/erigon-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
embed_test.go
40 lines (37 loc) · 870 Bytes
/
embed_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package snapshothashes
import "testing"
func TestFetchSnapshotHashes(t *testing.T) {
dat, err := fetchSnapshotHashes("https://raw.githubusercontent.com/erigontech/erigon-snapshot/main/mainnet.toml")
if err != nil {
t.Errorf("fetchSnapshotHashes() failed: %v", err)
}
if len(dat) == 0 {
t.Errorf("fetchSnapshotHashes() failed: empty data")
}
}
func TestFetchSnapshotHashesAll(t *testing.T) {
if !LoadSnapshots() {
t.Errorf("LoadSnapshots() failed")
}
if len(Mainnet) == 0 {
t.Errorf("Mainnet is empty")
}
if len(Sepolia) == 0 {
t.Errorf("Sepolia is empty")
}
if len(Amoy) == 0 {
t.Errorf("Amoy is empty")
}
if len(BorMainnet) == 0 {
t.Errorf("BorMainnet is empty")
}
if len(Gnosis) == 0 {
t.Errorf("Gnosis is empty")
}
if len(Chiado) == 0 {
t.Errorf("Chiado is empty")
}
if len(Holesky) == 0 {
t.Errorf("Holesky is empty")
}
}