diff --git a/components/server/src/workspace/context-service.spec.db.ts b/components/server/src/workspace/context-service.spec.db.ts index 282da510023f60..97da2d968dea1e 100644 --- a/components/server/src/workspace/context-service.spec.db.ts +++ b/components/server/src/workspace/context-service.spec.db.ts @@ -34,6 +34,7 @@ import { ConfigProvider } from "./config-provider"; import { PrebuildManager } from "../prebuilds/prebuild-manager"; import { HostContextProvider } from "../auth/host-context-provider"; import { AuthProvider } from "../auth/auth-provider"; +import { Experiments } from "@gitpod/gitpod-protocol/lib/experiments/configcat-server"; const expect = chai.expect; @@ -64,6 +65,7 @@ describe("ContextService", async () => { let member: User; let stranger: User; let org: Organization; + let org2: Organization; let project: Project; let workspace: ProtocolWorkspace; let snapshot: Snapshot; @@ -72,6 +74,9 @@ describe("ContextService", async () => { beforeEach(async () => { container = createTestContainer(); + Experiments.configureTestingClient({ + centralizedPermissions: true, + }); container.rebind(ConfigProvider).toConstantValue({ fetchConfig: () => { return { @@ -222,6 +227,7 @@ describe("ContextService", async () => { authProviderId: "Public-GitHub", }, }); + org2 = await orgService.createOrganization(stranger.id, "stranger-org"); // create a workspace const workspaceService = container.get(WorkspaceService); @@ -236,7 +242,7 @@ describe("ContextService", async () => { prebuild = await prebuildManager.triggerPrebuild({}, owner, project.id, "main"); // create a workspace and snapshot for another user - const anotherWorkspace = await createTestWorkspace(workspaceService, org, stranger, project); + const anotherWorkspace = await createTestWorkspace(workspaceService, org2, stranger, project); snapshot_stranger = await snapshotService.createSnapshot( { workspaceId: anotherWorkspace.id }, SNAPSHOT_BUCKET,