mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-12-22 17:14:22 +00:00
Simplify logging config
This commit is contained in:
@@ -44,8 +44,8 @@ func TestLoadConfig_Defaults(t *testing.T) {
|
||||
if cfg.Instances.InstancesDir != filepath.Join(homedir, ".local", "share", "llamactl", "instances") {
|
||||
t.Errorf("Expected default instances directory '%s', got %q", filepath.Join(homedir, ".local", "share", "llamactl", "instances"), cfg.Instances.InstancesDir)
|
||||
}
|
||||
if cfg.Instances.Logging.LogsDir != filepath.Join(homedir, ".local", "share", "llamactl", "logs") {
|
||||
t.Errorf("Expected default logs directory '%s', got %q", filepath.Join(homedir, ".local", "share", "llamactl", "logs"), cfg.Instances.Logging.LogsDir)
|
||||
if cfg.Instances.LogsDir != filepath.Join(homedir, ".local", "share", "llamactl", "logs") {
|
||||
t.Errorf("Expected default logs directory '%s', got %q", filepath.Join(homedir, ".local", "share", "llamactl", "logs"), cfg.Instances.LogsDir)
|
||||
}
|
||||
if !cfg.Instances.AutoCreateDirs {
|
||||
t.Error("Expected default instances auto-create to be true")
|
||||
@@ -79,8 +79,7 @@ server:
|
||||
instances:
|
||||
port_range: [7000, 8000]
|
||||
max_instances: 5
|
||||
logging:
|
||||
logs_dir: "/custom/logs"
|
||||
logs_dir: "/custom/logs"
|
||||
llama_executable: "/usr/bin/llama-server"
|
||||
default_auto_restart: false
|
||||
default_max_restarts: 10
|
||||
@@ -107,8 +106,8 @@ instances:
|
||||
if cfg.Instances.PortRange != [2]int{7000, 8000} {
|
||||
t.Errorf("Expected port range [7000, 8000], got %v", cfg.Instances.PortRange)
|
||||
}
|
||||
if cfg.Instances.Logging.LogsDir != "/custom/logs" {
|
||||
t.Errorf("Expected logs directory '/custom/logs', got %q", cfg.Instances.Logging.LogsDir)
|
||||
if cfg.Instances.LogsDir != "/custom/logs" {
|
||||
t.Errorf("Expected logs directory '/custom/logs', got %q", cfg.Instances.LogsDir)
|
||||
}
|
||||
if cfg.Instances.MaxInstances != 5 {
|
||||
t.Errorf("Expected max instances 5, got %d", cfg.Instances.MaxInstances)
|
||||
@@ -158,8 +157,8 @@ func TestLoadConfig_EnvironmentOverrides(t *testing.T) {
|
||||
if cfg.Instances.PortRange != [2]int{5000, 6000} {
|
||||
t.Errorf("Expected port range [5000, 6000], got %v", cfg.Instances.PortRange)
|
||||
}
|
||||
if cfg.Instances.Logging.LogsDir != "/env/logs" {
|
||||
t.Errorf("Expected logs directory '/env/logs', got %q", cfg.Instances.Logging.LogsDir)
|
||||
if cfg.Instances.LogsDir != "/env/logs" {
|
||||
t.Errorf("Expected logs directory '/env/logs', got %q", cfg.Instances.LogsDir)
|
||||
}
|
||||
if cfg.Instances.MaxInstances != 20 {
|
||||
t.Errorf("Expected max instances 20, got %d", cfg.Instances.MaxInstances)
|
||||
|
||||
Reference in New Issue
Block a user