Updated contact key gen in test so index call wouldn't be ambiguous
This commit is contained in:
parent
97754cb907
commit
1534fc15c9
|
@ -2582,11 +2582,11 @@ func (s *MessengerSuite) TestEncryptDecryptIdentityImagesWithContactPubKeys() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make contact keys and Contacts, set the Contacts to added
|
// Make contact keys and Contacts, set the Contacts to added
|
||||||
var contactKeys []*ecdsa.PrivateKey
|
contactKeys := make([]*ecdsa.PrivateKey, 10)
|
||||||
for i:=0; i < 10; i++ {
|
for i := range contactKeys {
|
||||||
contactKey, err := crypto.GenerateKey()
|
contactKey, err := crypto.GenerateKey()
|
||||||
s.Require().NoError(err)
|
s.Require().NoError(err)
|
||||||
contactKeys = append(contactKeys, contactKey)
|
contactKeys[i] = contactKey
|
||||||
|
|
||||||
contact, err := BuildContactFromPublicKey(&contactKey.PublicKey)
|
contact, err := BuildContactFromPublicKey(&contactKey.PublicKey)
|
||||||
s.Require().NoError(err)
|
s.Require().NoError(err)
|
||||||
|
@ -2641,4 +2641,7 @@ func (s *MessengerSuite) TestEncryptDecryptIdentityImagesWithContactPubKeys() {
|
||||||
|
|
||||||
s.Require().NotEqual([]byte(smPayload), ci.Images["small"].Payload)
|
s.Require().NotEqual([]byte(smPayload), ci.Images["small"].Payload)
|
||||||
s.Require().NotEqual([]byte(lgPayload), ci.Images["large"].Payload)
|
s.Require().NotEqual([]byte(lgPayload), ci.Images["large"].Payload)
|
||||||
|
|
||||||
|
// RESET Messenger identity
|
||||||
|
s.m.identity = sender
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue