From f890d420192ba29bab25c7d9cb746348c8eac1ca Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Tue, 30 Dec 2014 13:17:54 -0800 Subject: [PATCH] fixed unit test --- shared/build/build_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shared/build/build_test.go b/shared/build/build_test.go index e1eaea07e..f9930efd3 100644 --- a/shared/build/build_test.go +++ b/shared/build/build_test.go @@ -422,8 +422,7 @@ func TestRunErrorCreate(t *testing.T) { b.image = &docker.Image{ID: "c3ab8ff137"} b.Build = &script.Build{} b.Repo = &repo.Repo{} - - if err := b.run(); err != docker.ErrBadRequest { + if err := b.run(); err == nil || err.Error() != "Error: Failed to create build container. Bad Request" { t.Errorf("Expected error when trying to create build container") } } @@ -456,7 +455,7 @@ func TestRunErrorStart(t *testing.T) { b.Build = &script.Build{} b.Repo = &repo.Repo{} - if err := b.run(); err != docker.ErrBadRequest { + if err := b.run(); err == nil || err.Error() != "Error: Failed to start build container. Bad Request" { t.Errorf("Expected error when trying to start build container") }