clean up legacy rpc (#2384)
* clean up legacy rpc * cleanup * cleanup * cleanup * tidy * cleanup * cleanup
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user