You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
403 B

package util
import (
"os"
"testing"
)
func TestCheckforPrivateKey(t *testing.T) {
TestReadInConfig(t)
privateKey = nil
if err := CheckForPrivateKey(); err != nil {
t.Fatalf("could not check for private key: %v", err)
}
if GetPrivateKey() == nil {
t.Fatalf("private key is nil")
}
if err := os.RemoveAll(Config.DataDir); err != nil {
t.Fatalf("could not remove data dir: %v", err)
}
}