Skip to content

Commit

Permalink
chore(workspaces): fix build (#2853)
Browse files Browse the repository at this point in the history
* chore(workspaces): fix build

* chore(workspaces): fix delete workspace domains injection

* test(workspaces): fix tests

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
  • Loading branch information
alemagio and gjedlicska authored Sep 2, 2024
1 parent ba1331e commit 48caace
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,12 @@ export = FF_WORKSPACES_MODULE_ENABLED
context.resourceAccessRules
)
await deleteWorkspaceDomainFactory({
deleteWorkspace: repoDeleteWorkspaceDomainFactory({ db }),
deleteWorkspaceDomain: repoDeleteWorkspaceDomainFactory({ db }),
countDomainsByWorkspaceId: countProjectsVersionsByWorkspaceIdFactory({
db
}),
updateWorkspace: updateWorkspaceFactory({
getWorkspace: getWorkspaceFactory({ db }),
getWorkspace: getWorkspaceWithDomainsFactory({ db }),
upsertWorkspace: upsertWorkspaceFactory({ db }),
emitWorkspaceEvent: getEventBus().emit
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,13 @@ describe('Workspaces GQL CRUD', () => {
expect(createRes).to.not.haveGraphQLErrors()
const workspaceId = createRes.data!.workspaceMutations.create.id

const addDomainRes = await apollo.execute(AddWorkspaceDomainDocument, {
input: {
workspaceId,
domain: 'example.org'
}
})
expect(addDomainRes).to.not.haveGraphQLErrors()
// Enable domain protection and discoverability
const getRes = await apollo.execute(UpdateWorkspaceDocument, {
input: {
Expand All @@ -854,14 +861,6 @@ describe('Workspaces GQL CRUD', () => {
})
expect(getRes).to.not.haveGraphQLErrors()

const addDomainRes = await apollo.execute(AddWorkspaceDomainDocument, {
input: {
workspaceId,
domain: 'example.org'
}
})
expect(addDomainRes).to.not.haveGraphQLErrors()

const deleteDomainRes = await apollo.execute(DeleteWorkspaceDomainDocument, {
input: {
workspaceId,
Expand Down

0 comments on commit 48caace

Please sign in to comment.