From 06f5b57185333e92712758886b4a72aad6718ef0 Mon Sep 17 00:00:00 2001 From: manNomi Date: Sat, 15 Aug 2026 17:24:03 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=EC=8B=A4=EC=84=9C=EB=B2=84=20=EA=B2=80?= =?UTF-8?q?=EC=88=98=EC=97=90=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=8A=B9?= =?UTF-8?q?=EC=9D=B8=20=ED=9D=90=EB=A6=84=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/check-live-e2e.mjs | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/scripts/check-live-e2e.mjs b/scripts/check-live-e2e.mjs index 0fad420..e1b28db 100644 --- a/scripts/check-live-e2e.mjs +++ b/scripts/check-live-e2e.mjs @@ -7,6 +7,7 @@ const apiBaseUrl = ( ).replace(/\/+$/, ''); const runId = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`; const password = 'SoundlogLive!2026'; +const moderationAdminKey = process.env.LIVE_MODERATION_ADMIN_KEY; const users = []; const passedSteps = []; @@ -23,6 +24,11 @@ async function request(path, options = {}) { if (options.token) { headers.Authorization = `Bearer ${options.token}`; } + if (options.admin) { + assert(moderationAdminKey, 'LIVE_MODERATION_ADMIN_KEY is required for moderation checks.'); + headers['x-soundlog-admin-key'] = moderationAdminKey; + headers['x-soundlog-admin-actor'] = 'live-e2e'; + } if (options.form) { body = options.form; @@ -143,7 +149,7 @@ try { // steps below (registration, recap captures, etc.). }); - await step('register, login, refresh, profile, and migration', async () => { + await step('register, login, refresh, and profile', async () => { primary = await registerUser('primary'); companion = await registerUser('companion'); @@ -177,12 +183,8 @@ try { assert(me.payload?.data?.profile?.completedOnboarding === true, 'Profile was not completed.'); await request('/v1/me/migrate-local-data', { - body: { - idempotencyKey: `live-migration-${runId}`, - libraryTrackCount: 1, - momentLogCount: 2, - recapDraftCount: 1, - }, + body: {}, + expectedStatus: 404, method: 'POST', token: primary.accessToken, }); @@ -377,6 +379,14 @@ try { recapId = recap.payload?.data?.id; assert(recapId, 'Travel log was not created.'); + for (const contentId of [firstCaptureId, secondCaptureId]) { + await request(`/v1/admin/moderation/content/${contentId}`, { + admin: true, + body: { decision: 'approved', type: 'moment_log' }, + method: 'PATCH', + }); + } + const mine = await request('/v1/recaps?scope=mine', { token: primary.accessToken }); assert(mine.payload?.data?.some((item) => item.id === recapId), 'Created log is missing.'); const share = await request(`/v1/recaps/${recapId}/share`, {