type aliases -> type definitions (#312)

* type alias -> type definition

* participantSid -> participantID in a comment

* Update protocol
This commit is contained in:
Raja Subramanian
2022-01-03 12:43:58 +05:30
committed by GitHub
parent d5c955d11f
commit 995c1e8676
39 changed files with 490 additions and 482 deletions
+3 -3
View File
@@ -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)
}