Skip to content

Commit

Permalink
chore(regions): repair build
Browse files Browse the repository at this point in the history
  • Loading branch information
cdriesler committed Feb 7, 2025
1 parent 2b00b47 commit 25eacc3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
8 changes: 5 additions & 3 deletions packages/server/modules/automate/tests/automations.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,11 @@ const buildAutomationUpdate = () => {

it('fails when refering to nonexistent function releases', async () => {
const create = buildAutomationRevisionCreate({
getFunctionRelease: async () => {
// TODO: Update once we know how exec engine should respond
throw new Error('Function release with ID XXX not found')
overrides: {
getFunctionRelease: async () => {
// TODO: Update once we know how exec engine should respond
throw new Error('Function release with ID XXX not found')
}
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { Commit } from '@/modules/core/domain/commits/types'
import { Stream } from '@/modules/core/domain/streams/types'
import {
BranchCommitRecord,
ObjectChildrenClosureRecord,
ObjectRecord,
CommitRecord,
StreamCommitRecord,
Expand Down Expand Up @@ -63,8 +62,6 @@ const tables = {
streamFavorites: (db: Knex) => db<StreamFavoriteRecord>(StreamFavorites.name),
streamsMeta: (db: Knex) => db(StreamsMeta.name),
objects: (db: Knex) => db<ObjectRecord>(Objects.name),
objectClosures: (db: Knex) =>
db<ObjectChildrenClosureRecord>('object_children_closure'),
objectPreviews: (db: Knex) => db<ObjectPreview>('object_preview'),
automations: (db: Knex) => db<AutomationRecord>(Automations.name),
automationTokens: (db: Knex) => db<AutomationTokenRecord>(AutomationTokens.name),
Expand Down
16 changes: 6 additions & 10 deletions packages/server/test/speckle-helpers/automationHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,13 @@ export const generateFunctionReleaseId = () => cryptoRandomString({ length: 10 }
*/
export const buildAutomationCreate = (
params: {
dbClient: Knex
dbClient?: Knex
overrides?: Partial<{
createDbAutomation: typeof clientCreateAutomation
}>
} = {
dbClient: db
}
} = {}
) => {
const { dbClient, overrides } = params
const { dbClient = db, overrides } = params

const create = createAutomationFactory({
createAuthCode: createStoredAuthCodeFactory({ redis: createInmemoryRedisClient() }),
Expand All @@ -94,13 +92,11 @@ export const buildAutomationCreate = (
*/
export const buildAutomationRevisionCreate = (
params: {
dbClient: Knex
dbClient?: Knex
overrides?: Partial<CreateAutomationRevisionDeps>
} = {
dbClient: db
}
} = {}
) => {
const { dbClient, overrides } = params
const { dbClient = db, overrides } = params

const fakeGetRelease = (params: {
functionReleaseId: string
Expand Down

0 comments on commit 25eacc3

Please sign in to comment.