mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 02:27:08 -04:00 
			
		
		
		
	* add library validation api * chore: open api * show warning i UI * add flex row * fix e2e * tests * fix tests * enforce path validation * enforce validation on refresh * return 400 on bad import path * add limits to import paths * set response code to 200 * fix e2e * fix lint * fix test * restore e2e folder * fix import * use startsWith * icon color * notify user of failed validation * add parent div to validation * add docs to the import validation * improve library troubleshooting docs * fix button alignment --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
		
			
				
	
	
		
			30 lines
		
	
	
		
			938 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			938 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { PostgreSqlContainer } from '@testcontainers/postgresql';
 | |
| import path from 'node:path';
 | |
| 
 | |
| export default async () => {
 | |
|   let IMMICH_TEST_ASSET_PATH: string = '';
 | |
| 
 | |
|   if (process.env.IMMICH_TEST_ASSET_PATH === undefined) {
 | |
|     IMMICH_TEST_ASSET_PATH = path.normalize(`${__dirname}/../../test/assets/`);
 | |
|     process.env.IMMICH_TEST_ASSET_PATH = IMMICH_TEST_ASSET_PATH;
 | |
|   } else {
 | |
|     IMMICH_TEST_ASSET_PATH = process.env.IMMICH_TEST_ASSET_PATH;
 | |
|   }
 | |
| 
 | |
|   const pg = await new PostgreSqlContainer('tensorchord/pgvecto-rs:pg14-v0.2.0')
 | |
|     .withDatabase('immich')
 | |
|     .withUsername('postgres')
 | |
|     .withPassword('postgres')
 | |
|     .withReuse()
 | |
|     .withCommand(['-c', 'fsync=off', '-c', 'shared_preload_libraries=vectors.so'])
 | |
|     .start();
 | |
| 
 | |
|   process.env.DB_URL = pg.getConnectionUri();
 | |
|   process.env.NODE_ENV = 'development';
 | |
|   process.env.TZ = 'Z';
 | |
| 
 | |
|   if (process.env.LOG_LEVEL === undefined) {
 | |
|     process.env.LOG_LEVEL = 'fatal';
 | |
|   }
 | |
| };
 |