fix(tests): minio upload type is not exported anymore
Some checks failed
Deploy HD2 docs to Netlify / Deploys to netlify (push) Has been cancelled
Docker / build-and-push (backend) (push) Waiting to run
Docker / build-and-push (frontend) (push) Waiting to run
E2E Tests / backend-sqlite (push) Waiting to run
E2E Tests / backend-mariadb (push) Waiting to run
E2E Tests / backend-postgres (push) Waiting to run
E2E Tests / Build test build of frontend (push) Waiting to run
E2E Tests / frontend-cypress (1) (push) Blocked by required conditions
E2E Tests / frontend-cypress (2) (push) Blocked by required conditions
E2E Tests / frontend-cypress (3) (push) Blocked by required conditions
Lint and check format / Lint files and check formatting (push) Waiting to run
REUSE Compliance Check / reuse (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Static Analysis / Njsscan code scanning (push) Waiting to run
Static Analysis / CodeQL analysis (push) Waiting to run
Run tests & build / Test and build with NodeJS 20 (push) Waiting to run

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2024-09-12 16:53:04 +02:00
parent 57cba653e3
commit 21dcf0eb49
3 changed files with 5 additions and 13 deletions

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import * as MinioModule from 'minio';
import { Client, ClientOptions, UploadedObjectInfo } from 'minio';
import { Client, ClientOptions } from 'minio';
import { Mock } from 'ts-mockery';
import { MediaConfig } from '../../config/media.config';
@ -139,7 +139,10 @@ describe('s3 backend', () => {
const saveSpy = jest
.spyOn(mockedClient, 'putObject')
.mockImplementation(() =>
Promise.resolve(Mock.of<UploadedObjectInfo>({})),
Promise.resolve({
etag: 'mock',
versionId: 'mock',
}),
);
const sut = new S3Backend(mockedLoggerService, mediaConfig);