fix: Report completion for all 3 participants in TestCompleteKeygenFlow

The test was only reporting completion for one participant, but the session
requires ALL participants to report completion before transitioning to
"completed" status. This follows the domain logic in ShouldCompleteSession()
which checks session.AllCompleted().

Changes:
- Added reportCompletion calls for all 3 parties (party_user_device,
  party_server, party_recovery)
- Updated test comment to clarify all participants must report completion
This commit is contained in:
hailin 2025-11-29 00:52:53 -08:00
parent 7531cbd07a
commit cc6a76514b
1 changed files with 3 additions and 1 deletions

View File

@ -166,9 +166,11 @@ func (s *KeygenFlowTestSuite) TestCompleteKeygenFlow() {
statusResp = s.getSessionStatus(sessionID)
assert.Equal(s.T(), "in_progress", statusResp.Status)
// Step 9: Report completion (simulate keygen completion)
// Step 9: Report completion for all participants (simulate keygen completion)
publicKey := []byte("test-group-public-key-from-keygen")
s.reportCompletion(sessionID, "party_user_device", publicKey)
s.reportCompletion(sessionID, "party_server", publicKey)
s.reportCompletion(sessionID, "party_recovery", publicKey)
// Step 10: Verify session is completed
statusResp = s.getSessionStatus(sessionID)