Revision c37485ad2904a06e50beb63ddf44cae7e381fc2c authored by Jorropo on 08 August 2023, 10:55:08 UTC, committed by Jorropo on 08 August 2023, 12:01:19 UTC
(cherry picked from commit cfc142d85b1f0c4ec72ea322195cd7d526b5a1da)
1 parent bc0d1a4
bootstrap_peers_test.go
package config
import (
"sort"
"testing"
)
func TestBoostrapPeerStrings(t *testing.T) {
parsed, err := ParseBootstrapPeers(DefaultBootstrapAddresses)
if err != nil {
t.Fatal(err)
}
formatted := BootstrapPeerStrings(parsed)
sort.Strings(formatted)
expected := append([]string{}, DefaultBootstrapAddresses...)
sort.Strings(expected)
for i, s := range formatted {
if expected[i] != s {
t.Fatalf("expected %s, %s", expected[i], s)
}
}
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...