test stubs

This commit is contained in:
Hayden Parker
2016-04-01 21:36:20 -07:00
parent 7e00424a83
commit fc9974c33f
2 changed files with 67 additions and 1 deletions

View File

@ -88,10 +88,13 @@ func (keys_and_cert KeysAndCert) PublicKey() (key crypto.PublicKey, err error) {
} else {
// Key Certificate is not present, return the KEYS_AND_CERT_PUBKEY_SIZE byte
// PublicKey space as ElgPublicKey. No other Certificate
// types are currently in use
// types are currently in use.
var elg_key crypto.ElgPublicKey
copy(keys_and_cert[:KEYS_AND_CERT_PUBKEY_SIZE], elg_key[:])
key = elg_key
log.WithFields(log.Fields{
"cert_type": cert_type,
}).Warn("unused certificate type observed")
}
}

View File

@ -1 +1,64 @@
package common
import (
//"github.com/stretchr/testify/assert"
"testing"
)
func keysAndCertWithoutCertificate() {
}
func keysAndCertWithKeyCertificate() {
}
func TestCertificateWithMissingData(t *testing.T) {
}
func TestCertificateWithValidData(t *testing.T) {
}
func TestPublicKeyWithBadCertificate(t *testing.T) {
}
func TestPublicKeyWithZeroLengthCertificate(t *testing.T) {
}
func TestPublicKeyWithKeyCertificate(t *testing.T) {
}
func TestPublicKeyWithOtherCertType(t *testing.T) {
}
func TestSigningPublicKeyWithBadCertificate(t *testing.T) {
}
func TestSigningPublicKeyWithZeroLengthCertificate(t *testing.T) {
}
func TestSigningPublicKeyWithKeyCertificate(t *testing.T) {
}
func TestSigningPublicKeyWithOtherCertType(t *testing.T) {
}
func TestReadKeysAndCertWithMissingData(t *testing.T) {
}
func TestReadKeysAndCertWithMissingCertData(t *testing.T) {
}
func TestReadKeysAndCertWithValidDataWithCertificate(t *testing.T) {
}
func TestReadKeysAndCertWithValidDataWithoutCertificate(t *testing.T) {
}
func TestReadKeysAndCertWithValidDataWithCertificateAndRemainder(t *testing.T) {
}
func TestReadKeysAndCertWithValidDataWithoutCertificateAndRemainder(t *testing.T) {
}
//if assert.NotNil(err) {
// assert.Equal(err.Error(), "", "correct error message should be returned")
//}