github.com/MetalBlockchain/metalgo@v1.11.9/vms/platformvm/warp/signer_test.go (about) 1 // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package warp 5 6 import ( 7 "testing" 8 9 "github.com/stretchr/testify/require" 10 11 "github.com/MetalBlockchain/metalgo/ids" 12 "github.com/MetalBlockchain/metalgo/utils/constants" 13 "github.com/MetalBlockchain/metalgo/utils/crypto/bls" 14 ) 15 16 func TestSigner(t *testing.T) { 17 for name, test := range SignerTests { 18 t.Run(name, func(t *testing.T) { 19 sk, err := bls.NewSecretKey() 20 require.NoError(t, err) 21 22 chainID := ids.GenerateTestID() 23 s := NewSigner(sk, constants.UnitTestID, chainID) 24 25 test(t, s, sk, constants.UnitTestID, chainID) 26 }) 27 } 28 }