This repository has been archived on 2020-04-20. You can view files and clone it, but cannot push or open issues or pull requests.
2017-11-04 20:31:37 +00:00
|
|
|
package utils
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestGeneratePrivateKey(t *testing.T) {
|
2017-12-05 19:00:04 +00:00
|
|
|
_, err := GeneratePrivateKey()
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("Error while generating private key: %v", err)
|
|
|
|
}
|
2017-11-04 20:31:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func TestLoadPrivateKey(t *testing.T) {
|
2017-12-05 19:00:04 +00:00
|
|
|
_, err := LoadPrivateKeyFromFile("../testing/private_key")
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("Error while loading private key from file: %v", err)
|
|
|
|
}
|
2017-11-04 20:31:37 +00:00
|
|
|
}
|