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
Build and Push Docker Image / build (push) Successful in 2m44s
This commit is contained in:
+7
-8
@@ -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())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user