clean up legacy rpc (#2384)

* clean up legacy rpc

* cleanup

* cleanup

* cleanup

* tidy

* cleanup

* cleanup
This commit is contained in:
Paul Wells
2024-01-14 01:49:26 -08:00
committed by GitHub
parent 1cb4b3e585
commit 3f2f850bdb
13 changed files with 45 additions and 937 deletions
-20
View File
@@ -33,26 +33,6 @@ import (
)
func TestDeleteRoom(t *testing.T) {
t.Run("delete non-existent", func(t *testing.T) {
svc := newTestRoomService(config.RoomConfig{})
grant := &auth.ClaimGrants{
Video: &auth.VideoGrant{
RoomCreate: true,
},
}
ctx := service.WithGrants(context.Background(), grant)
svc.store.LoadRoomReturns(nil, nil, service.ErrRoomNotFound)
_, err := svc.DeleteRoom(ctx, &livekit.DeleteRoomRequest{
Room: "testroom",
})
require.Error(t, err)
if terr, ok := err.(twirp.Error); ok {
require.Equal(t, twirp.NotFound, terr.Code())
} else {
require.Fail(t, "should be twirp error")
}
})
t.Run("missing permissions", func(t *testing.T) {
svc := newTestRoomService(config.RoomConfig{})
grant := &auth.ClaimGrants{