diff --git a/jobs/cloud_controller_ng/spec b/jobs/cloud_controller_ng/spec index 4d0d1d7325..46fc28ab07 100644 --- a/jobs/cloud_controller_ng/spec +++ b/jobs/cloud_controller_ng/spec @@ -181,6 +181,7 @@ provides: - cc.packages.fog_gcp_storage_options - cc.packages.fog_connection - cc.packages.max_package_size + - cc.packages.max_valid_packages_stored - cc.packages.webdav_config.blobstore_timeout - cc.packages.webdav_config.ca_cert - cc.packages.webdav_config.password diff --git a/jobs/cloud_controller_worker/templates/cloud_controller_ng.yml.erb b/jobs/cloud_controller_worker/templates/cloud_controller_ng.yml.erb index 867dfc169a..429ba87432 100644 --- a/jobs/cloud_controller_worker/templates/cloud_controller_ng.yml.erb +++ b/jobs/cloud_controller_worker/templates/cloud_controller_ng.yml.erb @@ -186,6 +186,7 @@ packages: <% end %> app_package_directory_key: <%= p("cc.packages.app_package_directory_key") %> max_package_size: <%= p("cc.packages.max_package_size") %> + max_valid_packages_stored: <%= link("cloud_controller_internal").p("cc.packages.max_valid_packages_stored") %> <% if_p("cc.packages.cdn") do %> cdn: uri: <%= p("cc.packages.cdn.uri") %> diff --git a/spec/cloud_controller_worker/cloud_controller_worker_spec.rb b/spec/cloud_controller_worker/cloud_controller_worker_spec.rb index 722a82080f..ce1a0fb559 100644 --- a/spec/cloud_controller_worker/cloud_controller_worker_spec.rb +++ b/spec/cloud_controller_worker/cloud_controller_worker_spec.rb @@ -81,7 +81,10 @@ module Test 'enable_dynamic_job_priorities' => false }, 'app_log_revision' => true, - 'temporary_enable_v2' => true + 'temporary_enable_v2' => true, + 'packages' => { + 'max_valid_packages_stored' => 5 + } } } end @@ -267,6 +270,13 @@ module Test expect(template_hash['temporary_enable_v2']).to be(true) end end + + describe 'max valid packages stored' do + it 'is set from cloud_controller_internal_link' do + template_hash = YAML.safe_load(template.render(manifest_properties, consumes: links)) + expect(template_hash['packages']['max_valid_packages_stored']).to be(5) + end + end end end end