Logo
Explore Help
Register Sign In
CarrotSkin/backend
4
1
Fork 0
You've already forked backend
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
feature/redis-auth-integration
backend/internal/model/yggdrasil_test.go

19 lines
322 B
Go
Raw Permalink Normal View History

refactor: Remove Token management and integrate Redis for authentication - Deleted the Token model and its repository, transitioning to a Redis-based token management system. - Updated the service layer to utilize Redis for token storage, enhancing performance and scalability. - Refactored the container to remove TokenRepository and integrate the new token service. - Cleaned up the Dockerfile and other files by removing unnecessary whitespace and comments. - Enhanced error handling and logging for Redis initialization and usage.
2025-12-24 16:03:46 +08:00
package model
import (
"strings"
"testing"
)
func TestGenerateRandomPassword(t *testing.T) {
pwd := GenerateRandomPassword(16)
if len(pwd) != 16 {
t.Fatalf("length mismatch: %d", len(pwd))
}
for _, ch := range pwd {
if !strings.ContainsRune(passwordChars, ch) {
t.Fatalf("unexpected char: %c", ch)
}
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 24.7.0 Page: 177ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API