Skip to content

Commit

Permalink
Add "max_valid_packages_stored" config param to worker template (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenehret authored Dec 2, 2024
1 parent 09845ac commit 5939945
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions jobs/cloud_controller_ng/spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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") %>
Expand Down
12 changes: 11 additions & 1 deletion spec/cloud_controller_worker/cloud_controller_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5939945

Please sign in to comment.