@@ -102,6 +102,7 @@ func testBuildpackDownloader(t *testing.T, when spec.G, it spec.S) {
102102 mockDockerClient .EXPECT ().Info (context .TODO ()).Return (types.Info {OSType : "linux" }, nil ).AnyTimes ()
103103
104104 tmpDir , err = ioutil .TempDir ("" , "buildpack-downloader-test" )
105+ h .AssertNil (t , err )
105106
106107 packHome := filepath .Join (tmpDir , ".pack" )
107108 err = os .MkdirAll (packHome , 0755 )
@@ -144,9 +145,7 @@ func testBuildpackDownloader(t *testing.T, when spec.G, it spec.S) {
144145 packageImage = createPackage ("example.com/some/package@sha256:74eb48882e835d8767f62940d453eb96ed2737de3a16573881dcea7dea769df7" )
145146 })
146147 when ("daemon=true and pull-policy=always" , func () {
147-
148148 it ("should pull and use local package image" , func () {
149-
150149 buildpackDownloadOptions = pack.BuildpackDownloadOptions {
151150 RegistryName : "some-registry" ,
152151 ImageOS : "linux" ,
@@ -356,9 +355,7 @@ func testBuildpackDownloader(t *testing.T, when spec.G, it spec.S) {
356355 })
357356
358357 when ("buildpack is missing from registry" , func () {
359-
360358 it ("errors" , func () {
361-
362359 buildpackDownloadOptions .RegistryName = "some-registry"
363360 _ , _ , err := subject .BuildpackDownloader .Download (context .TODO (), "urn:cnb:registry:fake" , buildpackDownloadOptions )
364361 h .AssertError (t , err ,
@@ -367,9 +364,7 @@ func testBuildpackDownloader(t *testing.T, when spec.G, it spec.S) {
367364 })
368365
369366 when ("can't download image from registry" , func () {
370-
371367 it ("errors" , func () {
372-
373368 packageImage := fakes .NewImage ("example.com/some/package@sha256:74eb48882e835d8767f62940d453eb96ed2737de3a16573881dcea7dea769df7" , "" , nil )
374369 mockImageFetcher .EXPECT ().Fetch (gomock .Any (), packageImage .Name (), image.FetchOptions {Daemon : false , PullPolicy : config .PullAlways }).Return (nil , errors .New ("failed to pull" ))
375370
0 commit comments