mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02:00
chore: download e2e (#7651)
This commit is contained in:
parent
4dc0fc45e7
commit
8988d3f886
3 changed files with 49 additions and 9 deletions
e2e/src
|
@ -25,6 +25,7 @@ import {
|
|||
} from '@immich/sdk';
|
||||
import { BrowserContext } from '@playwright/test';
|
||||
import { exec, spawn } from 'node:child_process';
|
||||
import { createHash } from 'node:crypto';
|
||||
import { access } from 'node:fs/promises';
|
||||
import { tmpdir } from 'node:os';
|
||||
import path from 'node:path';
|
||||
|
@ -76,6 +77,10 @@ export const fileUtils = {
|
|||
reset: async () => {
|
||||
await execPromise(`docker exec -i "${serverContainerName}" /bin/bash -c "rm -rf ${dirs} && mkdir ${dirs}"`);
|
||||
},
|
||||
unzip: async (input: string, output: string) => {
|
||||
await execPromise(`unzip -o -d "${output}" "${input}"`);
|
||||
},
|
||||
sha1: (bytes: Buffer) => createHash('sha1').update(bytes).digest('base64'),
|
||||
};
|
||||
|
||||
export const dbUtils = {
|
||||
|
@ -150,7 +155,7 @@ export interface CliResponse {
|
|||
export const immichCli = async (args: string[]) => {
|
||||
let _resolve: (value: CliResponse) => void;
|
||||
const deferred = new Promise<CliResponse>((resolve) => (_resolve = resolve));
|
||||
const _args = ['node_modules/.bin/immich', '-d', '/tmp/immich/', ...args];
|
||||
const _args = ['node_modules/.bin/immich', '-d', `/${tempDir}/immich/`, ...args];
|
||||
const child = spawn('node', _args, {
|
||||
stdio: 'pipe',
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue