We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 591dd73 commit 48c10d2Copy full SHA for 48c10d2
1 file changed
internal/signer/sort_test.go
@@ -2,7 +2,6 @@ package signer_test
2
3
import (
4
"encoding/json"
5
- "reflect"
6
"sort"
7
"testing"
8
@@ -61,11 +60,17 @@ func TestSignerSortByIDs(t *testing.T) {
61
60
62
sort.Sort(signer.ByIDs(s))
63
64
- sorted := []keys.Signer{
65
- s4, s1, s5, s2, s3,
+ signerIDs := []string{}
+
+ for i, signer := range s {
66
+ ids := signer.PublicData().IDs()
67
+ if len(ids) != 1 {
68
+ t.Errorf("Signer %v IDs %v should have length 1", i, ids)
69
+ }
70
+ signerIDs = append(signerIDs, ids[0])
71
}
72
- if !reflect.DeepEqual(s, sorted) {
- t.Errorf("Signers incorrectly sorted: got %+v, want %+v", s, sorted)
73
+ if !sort.StringsAreSorted(signerIDs) {
74
+ t.Errorf("Signers incorrectly sorted: %+v", signerIDs)
75
76
0 commit comments