experimental-cli/pigeon/util_test.go

22 lines
308 B
Go
Raw Normal View History

package pigeon
import (
"bytes"
"testing"
)
func TestCreateIdentity(t *testing.T) {
2020-08-31 11:58:11 +00:00
resetDB()
pub, priv := CreateIdentity()
2020-08-28 12:24:50 +00:00
dbPubKey := GetConfig("public_key")
dbPrivKey := GetConfig("private_key")
2020-08-28 12:24:50 +00:00
if !bytes.Equal(pub, dbPubKey) {
t.Fail()
}
2020-08-28 12:24:50 +00:00
if !bytes.Equal(priv, dbPrivKey) {
t.Fail()
}
}