미디어 카탈로그 관찰 모드 정리

This commit is contained in:
2026-07-29 13:26:05 +09:00
parent ebc4a95b37
commit 3698032886
10 changed files with 27 additions and 41 deletions

View File

@@ -7,6 +7,14 @@ import {
extractMediaReferences,
normalizeMediaCatalogUrl
} from '../lib/media-catalog.js'
import { normalizeMediaCatalogMode } from '../server/utils/media-catalog-mode.js'
test('미디어 카탈로그 모드는 운영 조회 모드만 허용한다', () => {
assert.equal(normalizeMediaCatalogMode('filesystem'), 'filesystem')
assert.equal(normalizeMediaCatalogMode('DATABASE'), 'database')
assert.equal(normalizeMediaCatalogMode(' shadow '), null)
assert.equal(normalizeMediaCatalogMode(''), null)
})
test('SQL LIKE wildcard 검색 문자를 리터럴로 이스케이프한다', () => {
assert.equal(escapePostgresLikeLiteral('100%_done!'), '100!%!_done!!')