Commit Graph

1 Commits

Author SHA1 Message Date
google-labs-jules[bot]
0636596341 test: Increase test coverage for internal/platform/cache
This commit introduces a comprehensive test suite for the `RedisCache`
implementation in `internal/platform/cache/redis_cache.go`.

The following changes were made:
- Added `go-redis/redismock/v9` as a dev dependency to mock the Redis
  client.
- Created `internal/platform/cache/redis_cache_test.go` with tests for
  all public methods of `RedisCache`.
- Covered various scenarios, including success cases, cache misses,
  and Redis errors.
- Tested basic operations (Get, Set, Delete, Clear), multi-key
  operations (GetMulti, SetMulti), entity-specific helpers, and the
  `InvalidateEntityType` method.

This effort increased the test coverage for the `internal/platform/cache`
package from 10.3% to 89.7%, contributing to the overall goal of
achieving >80% test coverage for the project.
2025-10-08 21:28:56 +00:00