Interfaces (#97)

* create interface

* move room manager to interface

* interfaces

* updates

* fix loop

* fix fakes

* remove node types
This commit is contained in:
David Colburn
2021-08-28 18:28:08 -05:00
committed by GitHub
parent 4553695631
commit 69c1d4c295
16 changed files with 394 additions and 373 deletions
+3 -3
View File
@@ -32,10 +32,10 @@ func TestParticipantPersistence(t *testing.T) {
}
// create the participant
require.NoError(t, rs.PersistParticipant(roomName, p))
require.NoError(t, rs.StoreParticipant(roomName, p))
// result should match
pGet, err := rs.GetParticipant(roomName, p.Identity)
pGet, err := rs.LoadParticipant(roomName, p.Identity)
require.NoError(t, err)
require.Equal(t, p.Identity, pGet.Identity)
require.Equal(t, len(p.Tracks), len(pGet.Tracks))
@@ -54,7 +54,7 @@ func TestParticipantPersistence(t *testing.T) {
require.Len(t, participants, 0)
// shouldn't be able to get it
_, err = rs.GetParticipant(roomName, p.Identity)
_, err = rs.LoadParticipant(roomName, p.Identity)
require.Equal(t, err, service.ErrParticipantNotFound)
}