- Implemented TUI auto-select for automated testing - Fixed TUI automation: autoSelectMsg handling in Update() - Auto-database selection in DatabaseSelector - Created focused test suite (test_as_postgres.sh) - Created retention policy test (test_retention.sh) - All 10 security tests passing Features validated: ✅ Backup retention policy (30 days, min backups) ✅ Rate limiting (exponential backoff) ✅ Privilege checks (root detection) ✅ Resource limit validation ✅ Path sanitization ✅ Checksum verification (SHA-256) ✅ Audit logging ✅ Secure permissions ✅ Configuration persistence ✅ TUI automation framework Test results: 10/10 passed Backup files created with .dump, .sha256, .info Retention cleanup verified (old files removed)
26 lines
800 B
Go
Executable File
26 lines
800 B
Go
Executable File
package logger
|
|
|
|
// NullLogger is a logger that discards all output (useful for testing)
|
|
type NullLogger struct{}
|
|
|
|
// NewNullLogger creates a new null logger
|
|
func NewNullLogger() *NullLogger {
|
|
return &NullLogger{}
|
|
}
|
|
|
|
func (l *NullLogger) Info(msg string, args ...any) {}
|
|
func (l *NullLogger) Warn(msg string, args ...any) {}
|
|
func (l *NullLogger) Error(msg string, args ...any) {}
|
|
func (l *NullLogger) Debug(msg string, args ...any) {}
|
|
func (l *NullLogger) Time(msg string, args ...any) {}
|
|
|
|
func (l *NullLogger) StartOperation(name string) OperationLogger {
|
|
return &nullOperation{}
|
|
}
|
|
|
|
type nullOperation struct{}
|
|
|
|
func (o *nullOperation) Update(msg string, args ...any) {}
|
|
func (o *nullOperation) Complete(msg string, args ...any) {}
|
|
func (o *nullOperation) Fail(msg string, args ...any) {}
|