Refactor snapshot management: integrate logging, enhance concurrency with mutex, add clean extraction option, and update gRPC ListSnapshots with ListOptions.

This commit is contained in:
2025-07-07 20:03:40 +03:00
parent 19c02d3573
commit 223a63ee6d
14 changed files with 977 additions and 253 deletions

View File

@ -15,37 +15,37 @@ gen-proto:
--grpc-gateway_out=grpc --grpc-gateway_opt paths=source_relative \
./grpc/snapshot.proto
# Запуск всех тестов
# Run all tests
test:
go test -v ./...
# Запуск модульных тестов
# Run unit tests
test-unit:
go test -v ./store/... ./hash/... ./archive/...
# Запуск интеграционных тестов
# Run integration tests
test-integration:
go test -v -tags=integration ./...
# Запуск функциональных тестов
# Run functional tests
test-functional:
go test -v -run TestFull ./...
# Запуск тестов производительности
# Run performance tests
test-performance:
go test -v -run TestPerformanceMetrics ./...
go test -v -bench=. ./...
# Запуск тестов с покрытием кода
# Run tests with code coverage
test-coverage:
go test -v -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
# Запуск линтера
# Run linter
lint:
golangci-lint run
# Запуск всех проверок (тесты + линтер)
# Run all checks (tests + linter)
check: test lint
.PHONY: download-third-party gen-proto test test-unit test-integration test-functional test-performance test-coverage lint check