From 2a37697afbe6801f4103bc5b75be3af187cbd470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Tue, 23 Jun 2026 12:51:44 +0400 Subject: [PATCH] =?UTF-8?q?v0.1.8:=20clean-all=20=E2=80=94=20=D0=BE=D1=87?= =?UTF-8?q?=D0=B8=D1=81=D1=82=D0=BA=D0=B0=20=D0=B2=D1=81=D0=B5=D1=85=20?= =?UTF-8?q?=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=20=D0=BF=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=B4=20=D1=81=D0=B4=D0=B0=D1=87=D0=B5=D0=B9=20=D0=B2=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- v2/src/config/index.js | 2 +- v2/src/test/index.js | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9099a79..328b6af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ipwhitelist", - "version": "0.1.7", + "version": "0.1.8", "description": "IP WhiteList microservice for cloud provider", "main": "server.js", "scripts": { diff --git a/v2/src/config/index.js b/v2/src/config/index.js index b02a1d0..5747417 100644 --- a/v2/src/config/index.js +++ b/v2/src/config/index.js @@ -8,7 +8,7 @@ // ═══════════════════════════════════════════════════════════════════════════════ module.exports = { - version: '0.1.7', + version: '0.1.8', // ── IAM ────────────────────────────────────────────────────────────────── iamUrl: process.env.V2_IAM_URL || 'https://auth-api.ngcloud.ru/api/v1/auth/user', diff --git a/v2/src/test/index.js b/v2/src/test/index.js index 7cdc8df..ba1d02b 100644 --- a/v2/src/test/index.js +++ b/v2/src/test/index.js @@ -123,6 +123,14 @@ function createTestRouter() { return res.json({ ok: true, entriesDeleted: e.rowCount, auditDeleted: a.rowCount, clientId }); } + // ── CLEAN-ALL: очистить ВСЕ таблицы (для сдачи в прод) ── + case 'clean-all': { + const a = await pool.query('DELETE FROM audit_log'); + const e = await pool.query('DELETE FROM whitelist_entries'); + const c = await pool.query('DELETE FROM companies'); + return res.json({ ok: true, audit_log: a.rowCount, whitelist_entries: e.rowCount, companies: c.rowCount }); + } + // ── USERFLOW: полная эмуляция юзера через все слои ────── // Отличие от add/edit/delete: здесь выставляется мок-сессия // как после KC+IAM+resolveContext, и вызывается crud.