diff --git a/components/gitpod-db/src/typeorm/workspace-cluster-db-impl.ts b/components/gitpod-db/src/typeorm/workspace-cluster-db-impl.ts index 457ba8b843d7f3..9c539d8ae89846 100644 --- a/components/gitpod-db/src/typeorm/workspace-cluster-db-impl.ts +++ b/components/gitpod-db/src/typeorm/workspace-cluster-db-impl.ts @@ -54,6 +54,8 @@ export class WorkspaceClusterDBImpl implements WorkspaceClusterDB { state: "available", govern: false, admissionConstraints: [], + availableWorkspaceClasses: [], + preferredWorkspaceClass: "", }; const repo = await this.getRepo(); diff --git a/components/gitpod-db/src/workspace-cluster-db.spec.db.ts b/components/gitpod-db/src/workspace-cluster-db.spec.db.ts index 43c76e57cff40c..2766165b99b21f 100644 --- a/components/gitpod-db/src/workspace-cluster-db.spec.db.ts +++ b/components/gitpod-db/src/workspace-cluster-db.spec.db.ts @@ -101,6 +101,15 @@ export class WorkspaceClusterDBSpec { score: 0, maxScore: 0, govern: false, + availableWorkspaceClasses: [ + { + id: "some-class", + displayName: "Some Class", + description: "Some class description", + creditsPerMinute: 0.5, + }, + ], + preferredWorkspaceClass: "some-class", }); const wsc2: DBWorkspaceCluster = dbWorkspaceCluster({ name: "us71", @@ -118,6 +127,14 @@ export class WorkspaceClusterDBSpec { const wscs = await this.db.findFiltered({ name: "eu71" }); expect(wscs.length).to.equal(1); expect(wscs[0].name).to.equal("eu71"); + expect(wscs[0].availableWorkspaceClasses).to.deep.equal([ + { + id: "some-class", + displayName: "Some Class", + description: "Some class description", + creditsPerMinute: 0.5, + }, + ]); } @test public async testFindFilteredByApplicationCluster() {