replace Redis with an embedded SQLite string->string KV store (group commit, in-tx events, SQL search)
Build and Push Docker Image / build (push) Successful in 2m44s

This commit is contained in:
Worph
2026-10-19 20:51:00 +00:00
parent c53146e514
commit dc5cbdfb9b
80 changed files with 4601 additions and 6077 deletions
+7 -8
View File
@@ -30,8 +30,8 @@ func TestConfigDefaults(t *testing.T) {
t.Errorf("Expected HTTPPort 9000, got %d", cfg.HTTPPort)
}
if cfg.RedisPort != 6379 {
t.Errorf("Expected RedisPort 6379, got %d", cfg.RedisPort)
if cfg.DBPath() != cfg.MetaCorePath+"/db/meta-core.db" {
t.Errorf("Expected DBPath under MetaCorePath, got %q", cfg.DBPath())
}
}
@@ -41,7 +41,7 @@ func TestConfigFromEnv(t *testing.T) {
os.Setenv("FILES_PATH", "/custom/files")
os.Setenv("SERVICE_NAME", "test-service")
os.Setenv("META_CORE_HTTP_PORT", "8080")
os.Setenv("REDIS_PORT", "6380")
os.Setenv("META_CORE_DB_PATH", "/custom/db.sqlite")
defer os.Clearenv()
cfg := config.Load()
@@ -62,8 +62,8 @@ func TestConfigFromEnv(t *testing.T) {
t.Errorf("Expected HTTPPort 8080, got %d", cfg.HTTPPort)
}
if cfg.RedisPort != 6380 {
t.Errorf("Expected RedisPort 6380, got %d", cfg.RedisPort)
if cfg.DBPath() != "/custom/db.sqlite" {
t.Errorf("Expected DBPath '/custom/db.sqlite', got %q", cfg.DBPath())
}
}
@@ -77,9 +77,8 @@ func TestConfigPaths(t *testing.T) {
t.Errorf("Unexpected LockFilePath: %s", cfg.LockFilePath())
}
if cfg.RedisDataDir() != "/test/db/redis" {
t.Errorf("Unexpected RedisDataDir: %s", cfg.RedisDataDir())
if cfg.DBPath() != "/test/db/meta-core.db" {
t.Errorf("Unexpected DBPath: %s", cfg.DBPath())
}
}