mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
* ci: use spellcheck from unified CI * chore: fix spelling --------- Co-authored-by: Marcin Rataj <lidel@lidel.org>
25 lines
458 B
Go
25 lines
458 B
Go
package config
|
|
|
|
import (
|
|
"sort"
|
|
"testing"
|
|
)
|
|
|
|
func TestBootstrapPeerStrings(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)
|
|
}
|
|
}
|
|
}
|