mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-14 04:07:46 +00:00
Multiple changes to improve performance and reduce complexity.
- Optimise the errors and recovery. - Deduplicate code in metadata cache. - Remove unused performance monitoring code. - Simplify session management and settings handling.
This commit is contained in:
+2
-5
@@ -651,11 +651,8 @@ func TestErrorRecoveryPatterns(t *testing.T) {
|
||||
|
||||
// Test recovery from cache corruption
|
||||
t.Run("CacheCorruption", func(t *testing.T) {
|
||||
// Corrupt the cache by setting invalid data
|
||||
ts.tOidc.tokenCache.cache.items["corrupted"] = CacheItem{
|
||||
Value: "invalid-data",
|
||||
ExpiresAt: time.Now().Add(time.Hour),
|
||||
}
|
||||
// Corrupt the cache by using the Set method to avoid data race
|
||||
ts.tOidc.tokenCache.cache.Set("corrupted", "invalid-data", time.Hour)
|
||||
|
||||
// System should handle corrupted cache gracefully
|
||||
validToken, err := createTestJWT(ts.rsaPrivateKey, "RS256", "test-key-id", map[string]any{
|
||||
|
||||
Reference in New Issue
Block a user