type aliases -> type definitions (#312)
* type alias -> type definition * participantSid -> participantID in a comment * Update protocol
This commit is contained in:
@@ -37,7 +37,7 @@ func TestParticipantPersistence(t *testing.T) {
|
||||
require.NoError(t, rs.StoreParticipant(ctx, roomName, p))
|
||||
|
||||
// result should match
|
||||
pGet, err := rs.LoadParticipant(ctx, roomName, p.Identity)
|
||||
pGet, err := rs.LoadParticipant(ctx, roomName, livekit.ParticipantIdentity(p.Identity))
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, p.Identity, pGet.Identity)
|
||||
require.Equal(t, len(p.Tracks), len(pGet.Tracks))
|
||||
@@ -49,14 +49,14 @@ func TestParticipantPersistence(t *testing.T) {
|
||||
require.Len(t, participants, 1)
|
||||
|
||||
// deleting participant should return back to normal
|
||||
require.NoError(t, rs.DeleteParticipant(ctx, roomName, p.Identity))
|
||||
require.NoError(t, rs.DeleteParticipant(ctx, roomName, livekit.ParticipantIdentity(p.Identity)))
|
||||
|
||||
participants, err = rs.ListParticipants(ctx, roomName)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, participants, 0)
|
||||
|
||||
// shouldn't be able to get it
|
||||
_, err = rs.LoadParticipant(ctx, roomName, p.Identity)
|
||||
_, err = rs.LoadParticipant(ctx, roomName, livekit.ParticipantIdentity(p.Identity))
|
||||
require.Equal(t, err, service.ErrParticipantNotFound)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user