(t *testing.T)
| 68 | } |
| 69 | |
| 70 | func TestLogFilePath(t *testing.T) { |
| 71 | // Verify logs directory path is valid |
| 72 | logsDir := config.GetLogsDir() |
| 73 | |
| 74 | if logsDir == "" { |
| 75 | t.Error("GetLogsDir returned empty string") |
| 76 | } |
| 77 | |
| 78 | // Path should contain expected directory name |
| 79 | if !strings.Contains(strings.ToLower(logsDir), "surge") { |
| 80 | t.Errorf("Logs directory should be under surge config, got: %s", logsDir) |
| 81 | } |
| 82 | |
| 83 | if !strings.HasSuffix(logsDir, "logs") { |
| 84 | t.Errorf("Logs directory should end with 'logs', got: %s", logsDir) |
| 85 | } |
| 86 | |
| 87 | // Should be a valid path format |
| 88 | if !filepath.IsAbs(logsDir) { |
| 89 | t.Errorf("Logs directory should be absolute path, got: %s", logsDir) |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | func TestCleanupLogs(t *testing.T) { |
| 94 | // Use a temporary directory for this test |
nothing calls this directly
no test coverage detected