MCPcopy
hub / github.com/appleboy/gin-jwt / TestRedisRefreshTokenStore_ConnectionFailure

Function TestRedisRefreshTokenStore_ConnectionFailure

store/redis_test.go:257–273  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

255}
256
257func TestRedisRefreshTokenStore_ConnectionFailure(t *testing.T) {
258 // Test with invalid Redis configuration
259 config := &RedisConfig{
260 Addr: "invalid-host:6379",
261 Password: "",
262 DB: 0,
263 }
264
265 _, err := NewRedisRefreshTokenStore(config)
266 assert.Error(t, err, "Should return error for invalid Redis configuration")
267 assert.Contains(
268 t,
269 err.Error(),
270 "failed to create Redis client",
271 "Error should mention Redis client creation failure",
272 )
273}
274
275func TestRedisRefreshTokenStore_InvalidToken(t *testing.T) {
276 host, port := setupRedisContainer(t)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…