Skip to content

Commit

Permalink
#2023 update test to actually return data,
Browse files Browse the repository at this point in the history
  • Loading branch information
grindarius committed Jun 12, 2024
1 parent 5e01b4e commit 7108757
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/cli/src/backup/projects/export/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const generateCsvs = async (item: string, projectId: number, sequelize: S
try {
const records = await fetchData(query, projectId, sequelize, { limit: BATCH_SIZE, offset })
const mappedData = signedUrls === true ? await mapPathToSignedUrl(records as Array<object & { path: string }>, storage, legacyStorage) : records
const content = await toCsv(mappedData, { dateNF: 'm/d/yy hh:mm:ss' })
const content = await toCsv(mappedData, { dateNF: 'mm/dd/yy hh:mm:ss' })

zipFiles.push({ name: `${item}_${batchNumber}.csv`, content })
batchRecords = records?.length
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/backup/projects/index.int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Projects backup', async () => {
test('generates and zips files', async () => {
// Arrange
const { Backup, LocationProject, UserProfile } = ModelRepository.getInstance(sequelize)
const project = await LocationProject.findOne()
const project = await LocationProject.findOne({ where: { id: 201 } })
const user = await UserProfile.findOne()
if (user === null || project === null) throw Error('User & project required')
const backup = { entityId: project.id, entity: 'project' as BackupType, status: BackupStatus.REQUESTED, requestedBy: user.id, requestedAt: new Date() }
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/db/seeders/_data/integration/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { type Project } from '@rfcx-bio/common/dao/types'
export const fakeProject: Project = {
id: 201,
idCore: '8dcib372gh',
idArbimon: 201,
idArbimon: 1920,
slug: 'dci-fake',
name: 'DCI Fake Project',
status: 'listed',
Expand Down

0 comments on commit 7108757

Please sign in to comment.