mirror of
https://github.com/offen/docker-volume-backup.git
synced 2025-12-06 09:38:01 +01:00
Add failing test
This commit is contained in:
@@ -42,7 +42,9 @@ func (c *command) runAsCommand() error {
|
||||
return errwrap.Wrap(err, "error running script")
|
||||
}
|
||||
case "container":
|
||||
panic("execution mode container not implemented")
|
||||
if err := runInContainer(config); err != nil {
|
||||
return errwrap.Wrap(err, "error spawning container")
|
||||
}
|
||||
default:
|
||||
return errwrap.Wrap(nil, fmt.Sprintf("unknown execution mode %s", config.ExecutionMode))
|
||||
}
|
||||
@@ -131,7 +133,17 @@ func (c *command) schedule(strategy configStrategy) error {
|
||||
)
|
||||
}
|
||||
case "container":
|
||||
panic("execution mode container not implemented")
|
||||
if err := runInContainer(config); err != nil {
|
||||
c.logger.Error(
|
||||
fmt.Sprintf(
|
||||
"Unexpected error running schedule %s in container: %v",
|
||||
config.BackupCronExpression,
|
||||
errwrap.Unwrap(err),
|
||||
),
|
||||
"error",
|
||||
err,
|
||||
)
|
||||
}
|
||||
default:
|
||||
c.logger.Error(
|
||||
fmt.Sprintf(
|
||||
|
||||
Reference in New Issue
Block a user