mirror of
https://github.com/immich-app/immich.git
synced 2025-03-11 02:23:09 -05:00
chore(deps): update base-image to v20240416 (major) (#8660)
* chore(deps): update base-image to v20240416 * fix e2e * rename variable --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
parent
14b1425e98
commit
6d4d0f86cf
2 changed files with 17 additions and 55 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { AssetFileUploadResponseDto, LoginResponseDto, deleteAssets, updateAsset } from '@immich/sdk';
|
import { AssetFileUploadResponseDto, LoginResponseDto, deleteAssets, getMapMarkers, updateAsset } from '@immich/sdk';
|
||||||
import { DateTime } from 'luxon';
|
import { DateTime } from 'luxon';
|
||||||
import { readFile } from 'node:fs/promises';
|
import { readFile } from 'node:fs/promises';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
|
@ -32,6 +32,9 @@ describe('/search', () => {
|
||||||
let assetGlarus: AssetFileUploadResponseDto;
|
let assetGlarus: AssetFileUploadResponseDto;
|
||||||
let assetSprings: AssetFileUploadResponseDto;
|
let assetSprings: AssetFileUploadResponseDto;
|
||||||
let assetLast: AssetFileUploadResponseDto;
|
let assetLast: AssetFileUploadResponseDto;
|
||||||
|
let cities: string[];
|
||||||
|
let states: string[];
|
||||||
|
let countries: string[];
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await utils.resetDatabase();
|
await utils.resetDatabase();
|
||||||
|
@ -79,7 +82,7 @@ describe('/search', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// note: the coordinates here are not the actual coordinates of the images and are random for most of them
|
// note: the coordinates here are not the actual coordinates of the images and are random for most of them
|
||||||
const cities = [
|
const coordinates = [
|
||||||
{ latitude: 48.853_41, longitude: 2.3488 }, // paris
|
{ latitude: 48.853_41, longitude: 2.3488 }, // paris
|
||||||
{ latitude: 63.0695, longitude: -151.0074 }, // denali
|
{ latitude: 63.0695, longitude: -151.0074 }, // denali
|
||||||
{ latitude: 52.524_37, longitude: 13.410_53 }, // berlin
|
{ latitude: 52.524_37, longitude: 13.410_53 }, // berlin
|
||||||
|
@ -101,7 +104,7 @@ describe('/search', () => {
|
||||||
];
|
];
|
||||||
|
|
||||||
const updates = assets.map((asset, i) =>
|
const updates = assets.map((asset, i) =>
|
||||||
updateAsset({ id: asset.id, updateAssetDto: cities[i] }, { headers: asBearerAuth(admin.accessToken) }),
|
updateAsset({ id: asset.id, updateAssetDto: coordinates[i] }, { headers: asBearerAuth(admin.accessToken) }),
|
||||||
);
|
);
|
||||||
|
|
||||||
await Promise.all(updates);
|
await Promise.all(updates);
|
||||||
|
@ -133,6 +136,12 @@ describe('/search', () => {
|
||||||
assetLast = assets.at(-1) as AssetFileUploadResponseDto;
|
assetLast = assets.at(-1) as AssetFileUploadResponseDto;
|
||||||
|
|
||||||
await deleteAssets({ assetBulkDeleteDto: { ids: [assetSilver.id] } }, { headers: asBearerAuth(admin.accessToken) });
|
await deleteAssets({ assetBulkDeleteDto: { ids: [assetSilver.id] } }, { headers: asBearerAuth(admin.accessToken) });
|
||||||
|
|
||||||
|
const mapMarkers = await getMapMarkers({}, { headers: asBearerAuth(admin.accessToken) });
|
||||||
|
const nonTrashed = mapMarkers.filter((mark) => mark.id !== assetSilver.id);
|
||||||
|
cities = [...new Set(nonTrashed.map((mark) => mark.city).filter((entry): entry is string => !!entry))].sort();
|
||||||
|
states = [...new Set(nonTrashed.map((mark) => mark.state).filter((entry): entry is string => !!entry))].sort();
|
||||||
|
countries = [...new Set(nonTrashed.map((mark) => mark.country).filter((entry): entry is string => !!entry))].sort();
|
||||||
}, 30_000);
|
}, 30_000);
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
|
@ -452,21 +461,7 @@ describe('/search', () => {
|
||||||
const { status, body } = await request(app)
|
const { status, body } = await request(app)
|
||||||
.get('/search/suggestions?type=country')
|
.get('/search/suggestions?type=country')
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`);
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
expect(body).toEqual([
|
expect(body).toEqual(countries);
|
||||||
'Cuba',
|
|
||||||
'France',
|
|
||||||
'Georgia',
|
|
||||||
'Germany',
|
|
||||||
'Ghana',
|
|
||||||
'Japan',
|
|
||||||
'Morocco',
|
|
||||||
"People's Republic of China",
|
|
||||||
'Russian Federation',
|
|
||||||
'Singapore',
|
|
||||||
'Spain',
|
|
||||||
'Switzerland',
|
|
||||||
'United States of America',
|
|
||||||
]);
|
|
||||||
expect(status).toBe(200);
|
expect(status).toBe(200);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -474,23 +469,7 @@ describe('/search', () => {
|
||||||
const { status, body } = await request(app)
|
const { status, body } = await request(app)
|
||||||
.get('/search/suggestions?type=state')
|
.get('/search/suggestions?type=state')
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`);
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
expect(body).toEqual([
|
expect(body).toEqual(states);
|
||||||
'Accra, Greater Accra',
|
|
||||||
'Berlin',
|
|
||||||
'Glarus, Glarus',
|
|
||||||
'Havana',
|
|
||||||
'Marrakech, Marrakesh-Safi',
|
|
||||||
'Mesa County, Colorado',
|
|
||||||
'Neshoba County, Mississippi',
|
|
||||||
'New York',
|
|
||||||
'Page County, Virginia',
|
|
||||||
'Paris, Île-de-France',
|
|
||||||
'Province of Córdoba, Andalusia',
|
|
||||||
'Shanghai Municipality, Shanghai',
|
|
||||||
'St.-Petersburg',
|
|
||||||
'Tbilisi',
|
|
||||||
'Tokyo',
|
|
||||||
]);
|
|
||||||
expect(status).toBe(200);
|
expect(status).toBe(200);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -498,24 +477,7 @@ describe('/search', () => {
|
||||||
const { status, body } = await request(app)
|
const { status, body } = await request(app)
|
||||||
.get('/search/suggestions?type=city')
|
.get('/search/suggestions?type=city')
|
||||||
.set('Authorization', `Bearer ${admin.accessToken}`);
|
.set('Authorization', `Bearer ${admin.accessToken}`);
|
||||||
expect(body).toEqual([
|
expect(body).toEqual(cities);
|
||||||
'Accra',
|
|
||||||
'Berlin',
|
|
||||||
'Glarus',
|
|
||||||
'Havana',
|
|
||||||
'Marrakesh',
|
|
||||||
'Montalbán de Córdoba',
|
|
||||||
'New York City',
|
|
||||||
'Palisade',
|
|
||||||
'Paris',
|
|
||||||
'Philadelphia',
|
|
||||||
'Saint Petersburg',
|
|
||||||
'Shanghai',
|
|
||||||
'Singapore',
|
|
||||||
'Stanley',
|
|
||||||
'Tbilisi',
|
|
||||||
'Tokyo',
|
|
||||||
]);
|
|
||||||
expect(status).toBe(200);
|
expect(status).toBe(200);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# dev build
|
# dev build
|
||||||
FROM ghcr.io/immich-app/base-server-dev:20240326@sha256:d945aba864051b30888617f36446f86b72c4bc7ad6476b9dd2aaa0c4c4e3c945 as dev
|
FROM ghcr.io/immich-app/base-server-dev:20240416@sha256:ff2aadf54298e8ceca94031c6fed143236d8d82640fbbf422e0a9d2978e45923 as dev
|
||||||
|
|
||||||
RUN apt-get install --no-install-recommends -yqq tini
|
RUN apt-get install --no-install-recommends -yqq tini
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
@ -41,7 +41,7 @@ RUN npm run build
|
||||||
|
|
||||||
|
|
||||||
# prod build
|
# prod build
|
||||||
FROM ghcr.io/immich-app/base-server-prod:20240326@sha256:28ad98fed8d746b5f92de49ff776cfdff7399df163ebeda2f37a01f473965841
|
FROM ghcr.io/immich-app/base-server-prod:20240416@sha256:138f4d6fb74b282256583070339eaba6f39fcffa3569ae05b6823d5c37098242
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
ENV NODE_ENV=production \
|
ENV NODE_ENV=production \
|
||||||
|
|
Loading…
Add table
Reference in a new issue