Skip to content
Snippets Groups Projects
Commit 06c2c4f0 authored by Josh Brooks's avatar Josh Brooks
Browse files

Fix broken tests

parent 9cf7a004
No related branches found
No related tags found
3 merge requests!510Release,!207WIP: Client Restructure,!203Symmetric broadcast
...@@ -102,7 +102,7 @@ func TestStore_AddPartner(t *testing.T) { ...@@ -102,7 +102,7 @@ func TestStore_AddPartner(t *testing.T) {
receivedManager, err := r.AddPartner( receivedManager, err := r.AddPartner(
r.defaultID, partnerID, r.defaultID, partnerID,
partnerPubKey, r.defaultDHPrivateKey, partnerPubKey, r.defaultDHPrivateKey,
pubSIDHKey, myPrivSIDHKey, p, p, true) pubSIDHKey, myPrivSIDHKey, p, p)
if err != nil { if err != nil {
t.Fatalf("AddPartner returned an error: %v", err) t.Fatalf("AddPartner returned an error: %v", err)
} }
...@@ -142,7 +142,7 @@ func TestStore_DeletePartner(t *testing.T) { ...@@ -142,7 +142,7 @@ func TestStore_DeletePartner(t *testing.T) {
myPrivSIDHKey, _ := genSidhKeys(rng, sidh.KeyVariantSidhB) myPrivSIDHKey, _ := genSidhKeys(rng, sidh.KeyVariantSidhB)
_, err = r.AddPartner(r.defaultID, partnerID, r.defaultDHPrivateKey, _, err = r.AddPartner(r.defaultID, partnerID, r.defaultDHPrivateKey,
partnerPubKey, pubSIDHKey, myPrivSIDHKey, p, p, true) partnerPubKey, pubSIDHKey, myPrivSIDHKey, p, p)
if err != nil { if err != nil {
t.Fatalf("AddPartner returned an error: %v", err) t.Fatalf("AddPartner returned an error: %v", err)
} }
...@@ -172,7 +172,7 @@ func TestStore_GetPartner(t *testing.T) { ...@@ -172,7 +172,7 @@ func TestStore_GetPartner(t *testing.T) {
_, pubSIDHKey := genSidhKeys(rng, sidh.KeyVariantSidhA) _, pubSIDHKey := genSidhKeys(rng, sidh.KeyVariantSidhA)
myPrivSIDHKey, _ := genSidhKeys(rng, sidh.KeyVariantSidhB) myPrivSIDHKey, _ := genSidhKeys(rng, sidh.KeyVariantSidhB)
expectedManager, err := r.AddPartner(r.defaultID, partnerID, r.defaultDHPrivateKey, expectedManager, err := r.AddPartner(r.defaultID, partnerID, r.defaultDHPrivateKey,
partnerPubKey, pubSIDHKey, myPrivSIDHKey, p, p, true) partnerPubKey, pubSIDHKey, myPrivSIDHKey, p, p)
if err != nil { if err != nil {
t.Fatalf("AddPartner returned an error: %v", err) t.Fatalf("AddPartner returned an error: %v", err)
} }
......
...@@ -90,11 +90,15 @@ func TestFullExchange(t *testing.T) { ...@@ -90,11 +90,15 @@ func TestFullExchange(t *testing.T) {
// Add Alice and Bob as partners // Add Alice and Bob as partners
sendParams := session.GetDefaultParams() sendParams := session.GetDefaultParams()
receiveParams := session.GetDefaultParams() receiveParams := session.GetDefaultParams()
_, err = r.AddPartner(myID, bobID, bobPubKey, alicePrivKey, bobSIDHPubKey, aliceSIDHPrivKey, sendParams, receiveParams, false) _, err = r.AddPartner(myID, bobID, bobPubKey,
alicePrivKey, bobSIDHPubKey, aliceSIDHPrivKey,
sendParams, receiveParams)
if err != nil { if err != nil {
t.Errorf("Failed to add partner to ratchet: %+v", err) t.Errorf("Failed to add partner to ratchet: %+v", err)
} }
_, err = r.AddPartner(bobID, myID, alicePubKey, bobPrivKey, aliceSIDHPubKey, bobSIDHPrivKey, sendParams, receiveParams, false) _, err = r.AddPartner(bobID, myID, alicePubKey,
bobPrivKey, aliceSIDHPubKey, bobSIDHPrivKey,
sendParams, receiveParams)
if err != nil { if err != nil {
t.Errorf("Failed to add partner to ratchet: %+v", err) t.Errorf("Failed to add partner to ratchet: %+v", err)
} }
......
...@@ -83,11 +83,15 @@ func TestHandleTrigger(t *testing.T) { ...@@ -83,11 +83,15 @@ func TestHandleTrigger(t *testing.T) {
// Add bob as a partner // Add bob as a partner
sendParams := session2.GetDefaultParams() sendParams := session2.GetDefaultParams()
receiveParams := session2.GetDefaultParams() receiveParams := session2.GetDefaultParams()
_, err = r.AddPartner(myID, bobID, bobPubKey, alicePrivKey, bobSIDHPubKey, aliceSIDHPrivKey, sendParams, receiveParams, false) _, err = r.AddPartner(myID, bobID, bobPubKey,
alicePrivKey, bobSIDHPubKey, aliceSIDHPrivKey,
sendParams, receiveParams)
if err != nil { if err != nil {
t.Errorf("Failed to add partner to ratchet: %+v", err) t.Errorf("Failed to add partner to ratchet: %+v", err)
} }
_, err = r.AddPartner(bobID, myID, alicePubKey, bobPrivKey, aliceSIDHPubKey, bobSIDHPrivKey, sendParams, receiveParams, false) _, err = r.AddPartner(bobID, myID, alicePubKey, bobPrivKey,
aliceSIDHPubKey, bobSIDHPrivKey,
sendParams, receiveParams)
if err != nil { if err != nil {
t.Errorf("Failed to add partner to ratchet: %+v", err) t.Errorf("Failed to add partner to ratchet: %+v", err)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment