Skip to content

Commit

Permalink
Fix logging for backup pre-checks and actually running the backup
Browse files Browse the repository at this point in the history
[#139271493]

Signed-off-by: Rosie Bloxsom <[email protected]>
  • Loading branch information
tinygrasshopper authored and Rosie Bloxsom committed Mar 14, 2017
1 parent 3f7c374 commit 99bfbd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion integration/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ printf "backupcontent2" > $ARTIFACT_DIRECTORY/backupdump2
})

It("prints the backup progress to the screen", func() {
Expect(session.Out).To(gbytes.Say(fmt.Sprintf("INFO - Starting backup of %s...", deploymentName)))
Expect(session.Out).To(gbytes.Say(fmt.Sprintf("INFO - Running pre-checks for backup of %s...", deploymentName)))
Expect(session.Out).To(gbytes.Say("INFO - Scripts found:"))
Expect(session.Out).To(gbytes.Say("INFO - redis-dedicated-node/fake-uuid/redis/b-backup"))
Expect(session.Out).To(gbytes.Say(fmt.Sprintf("INFO - Starting backup of %s...", deploymentName)))
Expect(session.Out).To(gbytes.Say("INFO - Running pre-backup scripts..."))
Expect(session.Out).To(gbytes.Say("INFO - Done."))
Expect(session.Out).To(gbytes.Say("INFO - Running backup scripts..."))
Expand Down
3 changes: 2 additions & 1 deletion orchestrator/backup_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (bw *backupWorkflow) Run() Error {
}

func (bw *backupWorkflow) checkDeployment(e *fsm.Event) {
bw.Logger.Info("", "Starting backup of %s...\n", bw.deploymentName)
bw.Logger.Info("", "Running pre-checks for backup of %s...\n", bw.deploymentName)

exists := bw.ArtifactManager.Exists(bw.deploymentName)
if exists {
Expand Down Expand Up @@ -149,6 +149,7 @@ func (bw *backupWorkflow) cleanup(e *fsm.Event) {
}

func (bw *backupWorkflow) createEmptyLocalArtifact(e *fsm.Event) {
bw.Logger.Info("", "Starting backup of %s...\n", bw.deploymentName)
var err error
bw.artifact, err = bw.ArtifactManager.Create(bw.deploymentName, bw.Logger)
if err != nil {
Expand Down

0 comments on commit 99bfbd3

Please sign in to comment.