@@ -388,19 +388,15 @@ func testCreateBuilder(t *testing.T, when spec.G, it spec.S) {
388388 h .AssertContains (t , out .String (), "Warning: run image 'some/run-image' is not accessible" )
389389 })
390390
391- it ("should fail when not publish and the run image cannot be fetched" , func () {
392- mockImageFetcher .EXPECT ().Fetch (gomock .Any (), "some/run-image" , image.FetchOptions {Daemon : true , PullPolicy : image .PullAlways }).Return (nil , errors .New ("yikes" ))
393-
394- err := subject .CreateBuilder (context .TODO (), opts )
395- h .AssertError (t , err , "failed to fetch image: yikes" )
396- })
397-
398- it ("should fail when publish and the run image cannot be fetched" , func () {
399- mockImageFetcher .EXPECT ().Fetch (gomock .Any (), "some/run-image" , image.FetchOptions {Daemon : false , PullPolicy : image .PullAlways }).Return (nil , errors .New ("yikes" ))
391+ it ("should warn when publish and the run image cannot be fetched" , func () {
392+ prepareFetcherWithBuildImage ()
393+ mockImageFetcher .EXPECT ().Fetch (gomock .Any (), "some/run-image" , image.FetchOptions {Daemon : false , PullPolicy : image .PullAlways }).Return (nil , errors .Wrap (image .ErrNotFound , "yikes" ))
394+ mockImageFetcher .EXPECT ().Fetch (gomock .Any (), "localhost:5000/some/run-image" , image.FetchOptions {Daemon : false , PullPolicy : image .PullAlways }).Return (nil , errors .Wrap (image .ErrNotFound , "yikes" ))
400395
401396 opts .Publish = true
402397 err := subject .CreateBuilder (context .TODO (), opts )
403- h .AssertError (t , err , "failed to fetch image: yikes" )
398+ h .AssertNil (t , err )
399+ h .AssertContains (t , out .String (), "Warning: run image 'some/run-image' is not accessible" )
404400 })
405401
406402 it ("should fail when the run image isn't a valid image" , func () {
0 commit comments