github.com/ava-labs/avalanchego@v1.11.11/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_test 5 6 import ( 7 "testing" 8 9 "github.com/stretchr/testify/require" 10 11 "github.com/ava-labs/avalanchego/ids" 12 "github.com/ava-labs/avalanchego/utils/constants" 13 "github.com/ava-labs/avalanchego/utils/crypto/bls" 14 "github.com/ava-labs/avalanchego/vms/platformvm/warp" 15 "github.com/ava-labs/avalanchego/vms/platformvm/warp/signertest" 16 ) 17 18 func TestSigner(t *testing.T) { 19 for name, test := range signertest.SignerTests { 20 t.Run(name, func(t *testing.T) { 21 sk, err := bls.NewSecretKey() 22 require.NoError(t, err) 23 24 chainID := ids.GenerateTestID() 25 s := warp.NewSigner(sk, constants.UnitTestID, chainID) 26 27 test(t, s, sk, constants.UnitTestID, chainID) 28 }) 29 } 30 }