CI step for static check (#467)

* CI step for static check

* fix staticcheck
This commit is contained in:
David Zhao
2022-02-24 23:07:15 -08:00
committed by GitHub
parent 778d1aa141
commit 130decbf1d
6 changed files with 19 additions and 15 deletions
+2 -4
View File
@@ -13,8 +13,6 @@ import (
"github.com/livekit/livekit-server/pkg/service/servicefakes"
)
const grantsKey = "grants"
func TestDeleteRoom(t *testing.T) {
t.Run("normal deletion", func(t *testing.T) {
svc := newTestRoomService()
@@ -23,7 +21,7 @@ func TestDeleteRoom(t *testing.T) {
RoomCreate: true,
},
}
ctx := context.WithValue(context.Background(), grantsKey, grant)
ctx := service.WithGrants(context.Background(), grant)
svc.store.LoadRoomReturns(nil, service.ErrRoomNotFound)
_, err := svc.DeleteRoom(ctx, &livekit.DeleteRoomRequest{
Room: "testroom",
@@ -36,7 +34,7 @@ func TestDeleteRoom(t *testing.T) {
grant := &auth.ClaimGrants{
Video: &auth.VideoGrant{},
}
ctx := context.WithValue(context.Background(), grantsKey, grant)
ctx := service.WithGrants(context.Background(), grant)
_, err := svc.DeleteRoom(ctx, &livekit.DeleteRoomRequest{
Room: "testroom",
})