2015-08-18 05:57:27 +05:30
|
|
|
package db
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestNewPrivateKeySetRepoInvalidKey(t *testing.T) {
|
2015-10-29 05:19:25 +05:30
|
|
|
_, err := NewPrivateKeySetRepo(nil, false, []byte("sharks"))
|
2015-08-18 05:57:27 +05:30
|
|
|
if err == nil {
|
2015-12-17 06:41:23 +05:30
|
|
|
t.Errorf("Expected non-nil error for key secret that was not 32 bytes")
|
|
|
|
}
|
|
|
|
_, err = NewPrivateKeySetRepo(nil, false)
|
|
|
|
if err == nil {
|
|
|
|
t.Fatalf("Expected non-nil error when creating repo with no key secrets")
|
2015-08-18 05:57:27 +05:30
|
|
|
}
|
|
|
|
}
|