store unknown servers in the invitation process answer and finalize + server storage fixes and testing
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc
2024-06-05 14:45:01 +02:00
parent c0fd74f1e6
commit af55df1ff5
4 changed files with 172 additions and 4 deletions

View File

@ -30,7 +30,11 @@ func TestStorePeer(t *testing.T) {
}
peer := &Peer{
Uid: uuid.New().String(),
Uid: uuid.New().String(),
Name: "testName",
InvitationId: "testInvitationId",
MyName: "testMyName",
ContactPublicKey: "testContactPublicKey",
}
err := ps.StorePeer(peer)
@ -46,4 +50,11 @@ func TestStorePeer(t *testing.T) {
if len(peers) != 1 {
t.Errorf("Expected 1 peer, got %d", len(peers))
}
if peers[0].Uid != peer.Uid {
t.Errorf("Expected peer to have uid %s, got %s", peer.Uid, peers[0].Uid)
}
if peers[0].MyName != peer.MyName {
t.Errorf("Expected peer to have MyName %s, got %s", peer.MyName, peers[0].MyName)
}
}