@@ -499,9 +499,9 @@ func TestPrimitivesReturnsError(t *testing.T) {
499
499
}
500
500
for _ , tc := range testCases {
501
501
t .Run (tc .name , func (t * testing.T ) {
502
- _ , err := tc .handle .Primitives ()
502
+ _ , err := tc .handle .Primitives (internalapi. Token {} )
503
503
if err == nil {
504
- t .Errorf ("handle.Primitives() err = nil, want err" )
504
+ t .Errorf ("handle.Primitives(internalapi.Token{}, ) err = nil, want err" )
505
505
}
506
506
})
507
507
}
@@ -523,9 +523,9 @@ func TestPrimitivesWithKeyManagerReturnsError(t *testing.T) {
523
523
}
524
524
for _ , tc := range testCases {
525
525
t .Run (tc .name , func (t * testing.T ) {
526
- _ , err := tc .handle .PrimitivesWithKeyManager (& testKeyManager {})
526
+ _ , err := tc .handle .PrimitivesWithKeyManager (& testKeyManager {}, internalapi. Token {} )
527
527
if err == nil {
528
- t .Errorf ("handle.PrimitivesWithKeyManager(&testKeyManager{} ) err = nil, want err" )
528
+ t .Errorf ("handle.PrimitivesWithKeyManager() err = nil, want err" )
529
529
}
530
530
})
531
531
}
@@ -884,15 +884,15 @@ func TestPrimitivesWithConfig(t *testing.T) {
884
884
if err != nil {
885
885
t .Fatalf ("keyset.NewHandle(%v) = %v, want nil" , template , err )
886
886
}
887
- primitives , err := handle .Primitives (keyset .WithConfig (& testConfig {}))
887
+ primitives , err := handle .Primitives (internalapi. Token {}, keyset .WithConfig (& testConfig {}))
888
888
if err != nil {
889
- t .Fatalf ("handle.Primitives(keyset.WithConfig(&testConfig{})) err = %v, want nil" , err )
889
+ t .Fatalf ("handle.Primitives(internalapi.Token{}, keyset.WithConfig(&testConfig{})) err = %v, want nil" , err )
890
890
}
891
891
if len (primitives .EntriesInKeysetOrder ) != 1 {
892
- t .Fatalf ("len(handle.Primitives()) = %d, want 1" , len (primitives .EntriesInKeysetOrder ))
892
+ t .Fatalf ("len(handle.Primitives(internalapi.Token{}, )) = %d, want 1" , len (primitives .EntriesInKeysetOrder ))
893
893
}
894
894
if _ , ok := (primitives .Primary .Primitive ).(testPrimitive ); ! ok {
895
- t .Errorf ("handle.Primitives().Primary = %v, want instance of `testPrimitive`" , primitives .Primary .Primitive )
895
+ t .Errorf ("handle.Primitives(internalapi.Token{}, ).Primary = %v, want instance of `testPrimitive`" , primitives .Primary .Primitive )
896
896
}
897
897
}
898
898
@@ -903,9 +903,9 @@ func TestPrimitivesWithMultipleConfigs(t *testing.T) {
903
903
if err != nil {
904
904
t .Fatalf ("keyset.NewHandle(%v) = %v, want nil" , template , err )
905
905
}
906
- _ , err = handle .Primitives (keyset .WithConfig (& testConfig {}), keyset .WithConfig (& testConfig {}))
906
+ _ , err = handle .Primitives (internalapi. Token {}, keyset .WithConfig (& testConfig {}), keyset .WithConfig (& testConfig {}))
907
907
if err == nil { // if NO error
908
- t .Error ("handle.Primitives(keyset.WithConfig(&testConfig{}), keyset.WithConfig(&testConfig{})) err = nil, want error" )
908
+ t .Error ("handle.Primitives(internalapi.Token{}, keyset.WithConfig(&testConfig{}), keyset.WithConfig(&testConfig{})) err = nil, want error" )
909
909
}
910
910
}
911
911
@@ -934,9 +934,9 @@ func TestPrimitivesWithKeyManager(t *testing.T) {
934
934
}
935
935
936
936
// Verify that with the custom key manager provided we get the custom primitive.
937
- primitives , err := handle .PrimitivesWithKeyManager (& testKeyManager {})
937
+ primitives , err := handle .PrimitivesWithKeyManager (& testKeyManager {}, internalapi. Token {} )
938
938
if err != nil {
939
- t .Fatalf ("handle.PrimitivesWithKeyManager(testKeyManager ) err = %v, want nil" , err )
939
+ t .Fatalf ("handle.PrimitivesWithKeyManager() err = %v, want nil" , err )
940
940
}
941
941
if len (primitives .EntriesInKeysetOrder ) != 1 {
942
942
t .Fatalf ("len(handle.PrimitivesWithKeyManager()) = %d, want 1" , len (primitives .EntriesInKeysetOrder ))
@@ -1188,9 +1188,9 @@ func TestPrimitivesIsThreadSafe(t *testing.T) {
1188
1188
for i := 0 ; i < 50 ; i ++ {
1189
1189
t .Run (fmt .Sprintf ("entry %d" , i ), func (t * testing.T ) {
1190
1190
t .Parallel ()
1191
- _ , err := handle .Primitives ()
1191
+ _ , err := handle .Primitives (internalapi. Token {} )
1192
1192
if err != nil {
1193
- t .Fatalf ("handle.Primitives() err = %v, want nil" , err )
1193
+ t .Fatalf ("handle.Primitives(internalapi.Token{}, ) err = %v, want nil" , err )
1194
1194
}
1195
1195
})
1196
1196
}
@@ -1217,9 +1217,9 @@ func TestPrimitivesWithKeyManagerIsThreadSafe(t *testing.T) {
1217
1217
for i := 0 ; i < 50 ; i ++ {
1218
1218
t .Run (fmt .Sprintf ("entry %d" , i ), func (t * testing.T ) {
1219
1219
t .Parallel ()
1220
- _ , err := handle .PrimitivesWithKeyManager (keysetManager )
1220
+ _ , err := handle .PrimitivesWithKeyManager (keysetManager , internalapi. Token {} )
1221
1221
if err != nil {
1222
- t .Fatalf ("handle.PrimitivesWithKeyManager(keysetManager ) err = %v, want nil" , err )
1222
+ t .Fatalf ("handle.PrimitivesWithKeyManager() err = %v, want nil" , err )
1223
1223
}
1224
1224
})
1225
1225
}
0 commit comments