Skip to content

Commit

Permalink
exit if creating snapshot fails
Browse files Browse the repository at this point in the history
- also use cli.Run directly so we can see the output

[#175306351](https://www.pivotaltracker.com/story/show/175306351)
 Move integration test VMs to Nimbus

Signed-off-by: Sam Coward <scoward@vmware.com>
  • Loading branch information
XenoPhex authored and idoru committed Nov 4, 2020
1 parent 3e6bf93 commit be728b6
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions integration/construct/construct_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,10 @@ func createVMSnapshot(snapshotName string) {
snapshotName,
}
fmt.Printf("Creating VM Snapshot: %s on VM: %s\n", snapshotName, conf.VMInventoryPath)
// is blocking
exitCode := runIgnoringOutput(snapshotCommand)
if exitCode != 0 {
fmt.Print("There was an error creating the snapshot.")
} else {
fmt.Println("Snapshot command started.")
}
exitCode := cli.Run(snapshotCommand)
Expect(exitCode).To(Equal(0), "Creating the snapshot failed")

fmt.Println("Snapshot command started.")
fmt.Print("Waiting for snapshot to finish...")
time.Sleep(30 * time.Second)
fmt.Print("done.\n")
Expand Down

0 comments on commit be728b6

Please sign in to comment.