Adding basic tests for crypto_utils

This commit is contained in:
Sarah Jamie Lewis 2017-11-04 13:31:37 -07:00
parent 958e07bf66
commit e1031861a2
1 changed files with 19 additions and 0 deletions

19
utils/crypto_test.go Normal file
View File

@ -0,0 +1,19 @@
package utils
import (
"testing"
)
func TestGeneratePrivateKey(t *testing.T) {
_, err := GeneratePrivateKey()
if err != nil {
t.Errorf("Error while generating private key: %v", err)
}
}
func TestLoadPrivateKey(t *testing.T) {
_,err := LoadPrivateKeyFromFile("../testing/private_key")
if err != nil {
t.Errorf("Error while loading private key from file: %v", err)
}
}