Updated contact key gen in test so index call wouldn't be ambiguous

This commit is contained in:
Samuel Hawksby-Robinson 2021-02-12 15:50:47 +00:00 committed by Andrea Maria Piana
parent 97754cb907
commit 1534fc15c9
1 changed files with 6 additions and 3 deletions

View File

@ -2582,11 +2582,11 @@ func (s *MessengerSuite) TestEncryptDecryptIdentityImagesWithContactPubKeys() {
}
// Make contact keys and Contacts, set the Contacts to added
var contactKeys []*ecdsa.PrivateKey
for i:=0; i < 10; i++ {
contactKeys := make([]*ecdsa.PrivateKey, 10)
for i := range contactKeys {
contactKey, err := crypto.GenerateKey()
s.Require().NoError(err)
contactKeys = append(contactKeys, contactKey)
contactKeys[i] = contactKey
contact, err := BuildContactFromPublicKey(&contactKey.PublicKey)
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(lgPayload), ci.Images["large"].Payload)
// RESET Messenger identity
s.m.identity = sender
}