test(es): доказать, что oo search идёт в Elasticsearch (#56) #58

Merged
eSlider merged 1 commits from feat/es-integration#56 into main 2026-09-16 22:30:15 +01:00
Owner

Интеграционный тест-доказательство по W3 #56 (эпик #53).

Что добавлено

TestIntegrationESFacadeUsesES в file_es_integration_test.go:

  • c.Files().Search() возвращает Name() == "elasticsearch" и конкретный *ESSearcher — REST @search (только имена в БД) не является Searcher.
  • Известный запрос Rechnung_986-2025.pdf: найден ожидаемый файл, непустые id и path, Provider == elasticsearch.
  • Подстрока + scope: rechnung 2025 --substring --folder 522 возвращает непустую выдачу и тот же известный файл.
  • Без ONLYOFFICE_ES_URL — skip. REST-креды не нужны.

Замеры на живом ES (туннель 127.0.0.1:9200): exact — 2 хита / ~4.1 ms; substring+folder — 200 (limit) / ~16.7 ms.

Проверка

  • go test -tags=integration -run TestIntegrationES -v . — PASS (4 теста).
  • go build ./..., go vet ./..., go test ./..., go test -race . — зелёные.
  • gitleaks — no leaks.

Не мержу и не закрываю.

Интеграционный тест-доказательство по W3 #56 (эпик #53). ## Что добавлено `TestIntegrationESFacadeUsesES` в `file_es_integration_test.go`: - `c.Files().Search()` возвращает `Name() == "elasticsearch"` и конкретный `*ESSearcher` — REST `@search` (только имена в БД) не является `Searcher`. - Известный запрос `Rechnung_986-2025.pdf`: найден ожидаемый файл, непустые `id` и `path`, `Provider == elasticsearch`. - Подстрока + scope: `rechnung 2025 --substring --folder 522` возвращает непустую выдачу и тот же известный файл. - Без `ONLYOFFICE_ES_URL` — skip. REST-креды не нужны. Замеры на живом ES (туннель 127.0.0.1:9200): exact — 2 хита / ~4.1 ms; substring+folder — 200 (limit) / ~16.7 ms. ## Проверка - `go test -tags=integration -run TestIntegrationES -v .` — PASS (4 теста). - `go build ./...`, `go vet ./...`, `go test ./...`, `go test -race .` — зелёные. - gitleaks — no leaks. Не мержу и не закрываю.
eSlider added 1 commit 2026-09-16 22:22:47 +01:00
test(es): prove oo search uses the Elasticsearch backend (#56)
Release Please / Release Please (push) Skipped
Release / GoReleaser (push) Skipped
Tests / Secret scan (gitleaks) (push) Skipped
Tests / Test (Go 1.25) (push) Skipped
Tests / Test (Go stable) (push) Skipped
Tests / Secret scan (gitleaks) (pull_request) Successful in 3s
Tests / Test (Go stable) (pull_request) Successful in 24s
Tests / Test (Go 1.25) (pull_request) Successful in 25s
1a8bf0f83c
eSlider merged commit 43a1a47faa into main 2026-09-16 22:30:15 +01:00
eSlider deleted branch feat/es-integration#56 2026-09-16 22:30:15 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eSlider/go-onlyoffice#58