@@ -4,19 +4,20 @@ import (
44 "context"
55 "testing"
66
7- "github.com/letsencrypt/boulder/nonce"
8- "github.com/letsencrypt/boulder/test"
97 "google.golang.org/grpc/balancer"
108 "google.golang.org/grpc/balancer/base"
119 "google.golang.org/grpc/resolver"
10+
11+ "github.com/letsencrypt/boulder/nonce"
12+ "github.com/letsencrypt/boulder/test"
1213)
1314
1415func TestPickerPicksCorrectBackend (t * testing.T ) {
1516 _ , p , subConns := setupTest (false )
16- prefix := nonce .DerivePrefix (subConns [0 ].addrs [0 ].Addr , "Kala namak" )
17+ prefix := nonce .DerivePrefix (subConns [0 ].addrs [0 ].Addr , [] byte ( "Kala namak" ) )
1718
1819 testCtx := context .WithValue (context .Background (), nonce.PrefixCtxKey {}, "HNmOnt8w" )
19- testCtx = context .WithValue (testCtx , nonce.HMACKeyCtxKey {}, prefix )
20+ testCtx = context .WithValue (testCtx , nonce.HMACKeyCtxKey {}, [] byte ( prefix ) )
2021 info := balancer.PickInfo {Ctx : testCtx }
2122
2223 gotPick , err := p .Pick (info )
@@ -26,9 +27,9 @@ func TestPickerPicksCorrectBackend(t *testing.T) {
2627
2728func TestPickerMissingPrefixInCtx (t * testing.T ) {
2829 _ , p , subConns := setupTest (false )
29- prefix := nonce .DerivePrefix (subConns [0 ].addrs [0 ].Addr , "Kala namak" )
30+ prefix := nonce .DerivePrefix (subConns [0 ].addrs [0 ].Addr , [] byte ( "Kala namak" ) )
3031
31- testCtx := context .WithValue (context .Background (), nonce.HMACKeyCtxKey {}, prefix )
32+ testCtx := context .WithValue (context .Background (), nonce.HMACKeyCtxKey {}, [] byte ( prefix ) )
3233 info := balancer.PickInfo {Ctx : testCtx }
3334
3435 gotPick , err := p .Pick (info )
@@ -40,7 +41,7 @@ func TestPickerInvalidPrefixInCtx(t *testing.T) {
4041 _ , p , _ := setupTest (false )
4142
4243 testCtx := context .WithValue (context .Background (), nonce.PrefixCtxKey {}, 9 )
43- testCtx = context .WithValue (testCtx , nonce.HMACKeyCtxKey {}, "foobar" )
44+ testCtx = context .WithValue (testCtx , nonce.HMACKeyCtxKey {}, [] byte ( "foobar" ) )
4445 info := balancer.PickInfo {Ctx : testCtx }
4546
4647 gotPick , err := p .Pick (info )
@@ -73,10 +74,10 @@ func TestPickerInvalidHMACKeyInCtx(t *testing.T) {
7374
7475func TestPickerNoMatchingSubConnAvailable (t * testing.T ) {
7576 _ , p , subConns := setupTest (false )
76- prefix := nonce .DerivePrefix (subConns [0 ].addrs [0 ].Addr , "Kala namak" )
77+ prefix := nonce .DerivePrefix (subConns [0 ].addrs [0 ].Addr , [] byte ( "Kala namak" ) )
7778
7879 testCtx := context .WithValue (context .Background (), nonce.PrefixCtxKey {}, "rUsTrUin" )
79- testCtx = context .WithValue (testCtx , nonce.HMACKeyCtxKey {}, prefix )
80+ testCtx = context .WithValue (testCtx , nonce.HMACKeyCtxKey {}, [] byte ( prefix ) )
8081 info := balancer.PickInfo {Ctx : testCtx }
8182
8283 gotPick , err := p .Pick (info )
0 commit comments