Commit d03fad69 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet
Browse files

testutil: obvious names for seeded key pairs

parent f3c490a4
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
) )
func TestRsaKeys(t *testing.T) { func TestRsaKeys(t *testing.T) {
sk, pk, err := tu.RandKeyPair(512) sk, pk, err := tu.RandTestKeyPair(512)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
...@@ -93,7 +93,7 @@ func testKeyEquals(t *testing.T, k Key) { ...@@ -93,7 +93,7 @@ func testKeyEquals(t *testing.T, k Key) {
t.Fatal("Key not equal to key with same bytes.") t.Fatal("Key not equal to key with same bytes.")
} }
sk, pk, err := tu.RandKeyPair(512) sk, pk, err := tu.RandTestKeyPair(512)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
......
...@@ -45,7 +45,7 @@ func New(ctx context.Context) Mocknet { ...@@ -45,7 +45,7 @@ func New(ctx context.Context) Mocknet {
} }
func (mn *mocknet) GenPeer() (host.Host, error) { func (mn *mocknet) GenPeer() (host.Host, error) {
sk, _, err := testutil.SeededKeyPair(time.Now().UnixNano()) sk, _, err := testutil.SeededTestKeyPair(time.Now().UnixNano())
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
...@@ -26,15 +26,15 @@ func randPeer(t *testing.T) peer.ID { ...@@ -26,15 +26,15 @@ func randPeer(t *testing.T) peer.ID {
func TestNetworkSetup(t *testing.T) { func TestNetworkSetup(t *testing.T) {
ctx := context.Background() ctx := context.Background()
sk1, _, err := testutil.RandKeyPair(512) sk1, _, err := testutil.RandTestKeyPair(512)
if err != nil { if err != nil {
t.Fatal(t) t.Fatal(t)
} }
sk2, _, err := testutil.RandKeyPair(512) sk2, _, err := testutil.RandTestKeyPair(512)
if err != nil { if err != nil {
t.Fatal(t) t.Fatal(t)
} }
sk3, _, err := testutil.RandKeyPair(512) sk3, _, err := testutil.RandTestKeyPair(512)
if err != nil { if err != nil {
t.Fatal(t) t.Fatal(t)
} }
...@@ -398,7 +398,7 @@ func TestAdding(t *testing.T) { ...@@ -398,7 +398,7 @@ func TestAdding(t *testing.T) {
peers := []peer.ID{} peers := []peer.ID{}
for i := 0; i < 3; i++ { for i := 0; i < 3; i++ {
sk, _, err := testutil.RandKeyPair(512) sk, _, err := testutil.RandTestKeyPair(512)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
......
...@@ -41,7 +41,7 @@ type keyset struct { ...@@ -41,7 +41,7 @@ type keyset struct {
func (ks *keyset) generate() error { func (ks *keyset) generate() error {
var err error var err error
ks.sk, ks.pk, err = tu.RandKeyPair(512) ks.sk, ks.pk, err = tu.RandTestKeyPair(512)
if err != nil { if err != nil {
return err return err
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment