BOTNET: testify.assert тесты на бекенде вместо кучи if {t.fail} #13

Closed
pxc1984 wants to merge 0 commits from botnet/issue-12 into master
Owner

Closes #12

Интерфейсы

  • Изменения только в *_test.go (8 файлов: config, identity, inference (traits/reference), security, sync, discovery, mobilebind). Продакшен-код не тронут.
  • Конверсия hand-rolled if ... { t.Fatal/Fatalf } -> testify require/assert.

Команды проверки

cd backend
GOCACHE=$HOME/.cache/go-build-shared go vet ./...
GOCACHE=$HOME/.cache/go-build-shared go test ./internal/... ./cmd/...

Результаты тестов

  • go vet ./... — чисто
  • go test ./internal/... ./cmd/... — все пакеты ok (config, identity, inference, security, sync, discovery, sqlite, postgres, http, app, mobilebind)
  • gofumpt -l — чисто
Closes #12 ## Интерфейсы - Изменения только в *_test.go (8 файлов: config, identity, inference (traits/reference), security, sync, discovery, mobilebind). Продакшен-код не тронут. - Конверсия hand-rolled if ... { t.Fatal/Fatalf } -> testify require/assert. ## Команды проверки ``` cd backend GOCACHE=$HOME/.cache/go-build-shared go vet ./... GOCACHE=$HOME/.cache/go-build-shared go test ./internal/... ./cmd/... ``` ## Результаты тестов - go vet ./... — чисто - go test ./internal/... ./cmd/... — все пакеты ok (config, identity, inference, security, sync, discovery, sqlite, postgres, http, app, mobilebind) - gofumpt -l — чисто
test: перевести бекенд-тесты на testify require/assert
All checks were successful
Test, publish and deploy / Detect changed containers (pull_request) Successful in 8s
Test, publish and deploy / build-frontend (pull_request) Has been skipped
Test, publish and deploy / build-desktop (pull_request) Successful in 52s
Test, publish and deploy / build-backend (pull_request) Successful in 1m49s
Test, publish and deploy / build-image (pull_request) Successful in 48s
Test, publish and deploy / deploy (pull_request) Has been skipped
412fff8031
Убраны ручные if ... { t.Fatal/Fatalf } проверки в пользу testify.
Пакеты: config, identity, inference, security, sync, discovery, mobilebind.
pxc1984 closed this pull request 2026-11-21 14:28:38 +00:00
All checks were successful
Test, publish and deploy / Detect changed containers (pull_request) Successful in 8s
Test, publish and deploy / build-frontend (pull_request) Has been skipped
Test, publish and deploy / build-desktop (pull_request) Successful in 52s
Test, publish and deploy / build-backend (pull_request) Successful in 1m49s
Test, publish and deploy / build-image (pull_request) Successful in 48s
Test, publish and deploy / deploy (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cu3rd/yc-hack-horses!13
No description provided.