diff --git a/artifact/directory_artifact_test.go b/artifact/directory_artifact_test.go index de7b583f2..f8de95428 100644 --- a/artifact/directory_artifact_test.go +++ b/artifact/directory_artifact_test.go @@ -301,8 +301,8 @@ instances: }) It("writer writes contents to the file", func() { - writer.Write([]byte("they are taking our jobs")) - Expect(ioutil.ReadFile(artifactName + "/redis-0.tgz")).To(Equal([]byte("they are taking our jobs"))) + writer.Write([]byte("lalala a file")) + Expect(ioutil.ReadFile(artifactName + "/redis-0.tgz")).To(Equal([]byte("lalala a file"))) }) It("does not fail", func() { @@ -321,8 +321,8 @@ instances: }) It("writer writes contents to the file", func() { - writer.Write([]byte("they are taking our jobs")) - Expect(ioutil.ReadFile(artifactName + "/my-backup-artifact.tgz")).To(Equal([]byte("they are taking our jobs"))) + writer.Write([]byte("lalala a file")) + Expect(ioutil.ReadFile(artifactName + "/my-backup-artifact.tgz")).To(Equal([]byte("lalala a file"))) }) It("does not fail", func() { diff --git a/bosh/client_test.go b/bosh/client_test.go index a9ff30d9f..58570beb1 100644 --- a/bosh/client_test.go +++ b/bosh/client_test.go @@ -20,6 +20,7 @@ import ( "github.com/pivotal-cf/bosh-backup-and-restore/orchestrator" "github.com/pivotal-cf/bosh-backup-and-restore/ssh" "github.com/pivotal-cf/bosh-backup-and-restore/ssh/fakes" + "errors" ) var _ = Describe("Director", func() { @@ -688,7 +689,7 @@ var _ = Describe("Director", func() { }) Context("fails", func() { Context("to find deployment", func() { - var findDeploymentError = fmt.Errorf("what do you have to loose?") + var findDeploymentError = errors.New("no deployment here") BeforeEach(func() { boshDirector.FindDeploymentReturns(nil, findDeploymentError) }) @@ -697,7 +698,7 @@ var _ = Describe("Director", func() { }) }) Context("to download manifest", func() { - var downloadManifestError = fmt.Errorf("you will be tired of winning") + var downloadManifestError = errors.New("I refuse to download this manifest") BeforeEach(func() { boshDirector.FindDeploymentReturns(boshDeployment, nil) boshDeployment.ManifestReturns("", downloadManifestError) diff --git a/bosh/deployed_instance_test.go b/bosh/deployed_instance_test.go index 0bc2d4e1c..db8dbd2db 100644 --- a/bosh/deployed_instance_test.go +++ b/bosh/deployed_instance_test.go @@ -13,9 +13,10 @@ import ( . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" "github.com/pivotal-cf/bosh-backup-and-restore/bosh" + "github.com/pivotal-cf/bosh-backup-and-restore/ssh/fakes" "github.com/pivotal-cf/bosh-backup-and-restore/instance" "github.com/pivotal-cf/bosh-backup-and-restore/orchestrator" - "github.com/pivotal-cf/bosh-backup-and-restore/ssh/fakes" + "errors" ) var _ = Describe("Instance", func() { @@ -300,7 +301,7 @@ var _ = Describe("Instance", func() { Context("when there are several scripts and one of them fails to run pre backup lock while another one causes an error", func() { expectedStdout := "some stdout" expectedStderr := "some stderr" - expectedError := fmt.Errorf("you are fake news") + expectedError := errors.New("Errororororor") BeforeEach(func() { backupAndRestoreScripts = []instance.Script{ @@ -886,7 +887,7 @@ var _ = Describe("Instance", func() { Describe("error while running cleaning up the connection", func() { BeforeEach(func() { - expectedError = fmt.Errorf("werk niet") + expectedError = errors.New("werk niet") boshDeployment.CleanUpSSHReturns(expectedError) }) It("fails", func() { diff --git a/instance/blob_test.go b/instance/blob_test.go index e6661f459..02b81832a 100644 --- a/instance/blob_test.go +++ b/instance/blob_test.go @@ -206,7 +206,7 @@ var _ = Describe("blob", func() { var expectedErr error BeforeEach(func() { - expectedErr = fmt.Errorf("you fool") + expectedErr = fmt.Errorf("nope") sshConnection.RunReturns([]byte("don't matter"), []byte("don't matter"), 0, expectedErr) })