A command-line tool using the saltpack messaging format and the keys.pub Go library.
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.

21 lines
356 B

package salty
import (
"bytes"
"testing"
"github.com/stretchr/testify/assert"
)
func TestKeys(t *testing.T) {
assert := assert.New(t)
buf := &bytes.Buffer{}
key, pub := GenerateKeys(buf)
assert.NotEmpty(pub)
parsedKey, err := ParseIdentity(buf)
assert.NoError(err)
assert.Equal(key, parsedKey)
assert.Equal(pub, key.PublicKey().String())
}