github.com/yacovm/fabric@v2.0.0-alpha.0.20191128145320-c5d4087dc723+incompatible/common/crypto/random_test.go (about) 1 /* 2 Copyright IBM Corp. 2017 All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package crypto 8 9 import ( 10 "testing" 11 12 "github.com/stretchr/testify/assert" 13 ) 14 15 func TestGetRandomBytes(t *testing.T) { 16 _, err := GetRandomBytes(10) 17 18 assert.NoError(t, err, "GetRandomBytes fails") 19 } 20 21 func TestGetRandomNonce(t *testing.T) { 22 _, err := GetRandomNonce() 23 24 assert.NoError(t, err, "GetRandomNonce fails") 25 }