diff --git a/backup/internal/rsync_simulate.go b/backup/internal/rsync_simulate.go index 8eaf951..ae1253c 100644 --- a/backup/internal/rsync_simulate.go +++ b/backup/internal/rsync_simulate.go @@ -12,7 +12,7 @@ func NewSimulateCommand(binPath string, logPath string) SimulateCommand { return SimulateCommand{ SharedCommand: SharedCommand{ BinPath: binPath, - BaseLogPath: logPath, + BaseLogPath: logPath + "-sim", Shell: &OsExec{}, }, } diff --git a/backup/internal/test/rsync_test.go b/backup/internal/test/rsync_test.go index c06e0d8..951ea1c 100644 --- a/backup/internal/test/rsync_test.go +++ b/backup/internal/test/rsync_test.go @@ -123,3 +123,12 @@ func TestGetVersionInfo_IncompletePath(t *testing.T) { assert.Empty(t, versionInfo) assert.Empty(t, fullpath) } + +func TestNewSimulateCommand_BaseLogPath_ShallHaveSimSuffix(t *testing.T) { + binPath := "/usr/bin/simulate" + logPath := "/var/log/simulate" + + simulateCmd := NewSimulateCommand(binPath, logPath) + + assert.Equal(t, logPath+"-sim", simulateCmd.BaseLogPath) +}