Refactor encryption key handling: auto-generate if not provided, update README and tests

This commit is contained in:
2025-10-11 21:18:24 +02:00
parent d40321685e
commit 62605b3689
6 changed files with 170 additions and 32 deletions

View File

@@ -179,15 +179,6 @@ func TestLoad(t *testing.T) {
},
expectedError: "LEMMA_ADMIN_EMAIL and LEMMA_ADMIN_PASSWORD must be set",
},
{
name: "missing encryption key",
setupEnv: func(t *testing.T) {
cleanup()
setEnv(t, "LEMMA_ADMIN_EMAIL", "admin@example.com")
setEnv(t, "LEMMA_ADMIN_PASSWORD", "password123")
},
expectedError: "invalid LEMMA_ENCRYPTION_KEY: encryption key is required",
},
{
name: "invalid encryption key",
setupEnv: func(t *testing.T) {