@@ -46,13 +46,13 @@ module VCAP::CloudController
4646 let ( :buildpack2_file ) { 'abuildpack2.zip' }
4747
4848 let ( :buildpack1a_fields ) do
49- { name : 'buildpack1' , file : buildpack1a_file , stack : 'cflinuxfs11' , options : { } }
49+ { name : 'buildpack1' , file : buildpack1a_file , stack : 'cflinuxfs11' , options : { lifecycle : Lifecycles :: BUILDPACK } }
5050 end
5151 let ( :buildpack1b_fields ) do
52- { name : 'buildpack1' , file : buildpack1b_file , stack : 'cflinuxfs12' , options : { } }
52+ { name : 'buildpack1' , file : buildpack1b_file , stack : 'cflinuxfs12' , options : { lifecycle : Lifecycles :: BUILDPACK } }
5353 end
5454 let ( :buildpack2_fields ) do
55- { name : 'buildpack2' , file : buildpack2_file , stack : nil , options : { } }
55+ { name : 'buildpack2' , file : buildpack2_file , stack : nil , options : { lifecycle : Lifecycles :: BUILDPACK } }
5656 end
5757
5858 before do
@@ -153,7 +153,7 @@ module VCAP::CloudController
153153 # call install
154154 # verify that job_factory.plan was called with the right file
155155 expect ( File ) . to receive ( :file? ) . with ( 'another.zip' ) . and_return ( true )
156- expect ( job_factory ) . to receive ( :plan ) . with ( 'buildpack1' , [ { name : 'buildpack1' , file : 'another.zip' , stack : nil , options : { } } ] )
156+ expect ( job_factory ) . to receive ( :plan ) . with ( 'buildpack1' , [ { name : 'buildpack1' , file : 'another.zip' , stack : nil , options : { lifecycle : Lifecycles :: BUILDPACK } } ] )
157157
158158 installer . install ( TestConfig . config_instance . get ( :install_buildpacks ) )
159159 end
@@ -167,7 +167,7 @@ module VCAP::CloudController
167167 it 'succeeds when no package is specified' do
168168 TestConfig . config [ :install_buildpacks ] [ 0 ] . delete ( 'package' )
169169 expect ( File ) . to receive ( :file? ) . with ( 'another.zip' ) . and_return ( true )
170- expect ( job_factory ) . to receive ( :plan ) . with ( 'buildpack1' , [ { name : 'buildpack1' , file : 'another.zip' , stack : nil , options : { } } ] )
170+ expect ( job_factory ) . to receive ( :plan ) . with ( 'buildpack1' , [ { name : 'buildpack1' , file : 'another.zip' , stack : nil , options : { lifecycle : Lifecycles :: BUILDPACK } } ] )
171171
172172 installer . install ( TestConfig . config_instance . get ( :install_buildpacks ) )
173173 end
@@ -225,6 +225,7 @@ module VCAP::CloudController
225225 stack : nil ,
226226 options : {
227227 enabled : true ,
228+ lifecycle : Lifecycles ::BUILDPACK ,
228229 locked : false ,
229230 position : 5
230231 } } ] )
0 commit comments