Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add legacy_md5_buildpack_paths_enabled param #370

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions jobs/cloud_controller_ng/spec
Original file line number Diff line number Diff line change
Expand Up @@ -1212,3 +1212,7 @@ properties:
cc.update_metric_tags_on_rename:
description: "Enable sending a Desired LRP update when an app is renamed"
default: true

cc.legacy_md5_buildpack_paths_enabled:
description: "Enable legacy MD5 buildpack paths. If disabled, xxhash64 is used for calculating paths in buildpack image layers."
default: true
Original file line number Diff line number Diff line change
Expand Up @@ -522,3 +522,5 @@ threadpool_size: <%= p("cc.experimental.thin_server.thread_pool_size") %>
default_app_lifecycle: buildpack
custom_metric_tag_prefix_list: <%= p("cc.custom_metric_tag_prefix_list") %>
update_metric_tags_on_rename: <%= p("cc.update_metric_tags_on_rename") %>

legacy_md5_buildpack_paths_enabled: <%= p("cc.legacy_md5_buildpack_paths_enabled") %>
26 changes: 25 additions & 1 deletion spec/cloud_controller_ng/cloud_controller_ng_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ module Test
end
end

describe 'max_total_results' do
describe 'max_total_results' do
context "when 'cc.renderer.max_total_results' is set" do
it 'renders max_total_results into the ccng config' do
merged_manifest_properties['cc'].store('renderer', { 'max_total_results' => 1000 })
Expand All @@ -608,6 +608,30 @@ module Test
end
end
end

describe 'legacy_md5_buildpack_paths_enabled' do
context 'when legacy md5 buildpack paths are enabled' do
before do
merged_manifest_properties['cc']['legacy_md5_buildpack_paths_enabled'] = true
end

it 'renders the correct value into the ccng config' do
template_hash = YAML.safe_load(template.render(merged_manifest_properties, consumes: links))
expect(template_hash['legacy_md5_buildpack_paths_enabled']).to be(true)
end
end

context 'when legacy md5 buildpack paths are disabled' do
before do
merged_manifest_properties['cc']['legacy_md5_buildpack_paths_enabled'] = false
end

it 'renders the correct value into the ccng config' do
template_hash = YAML.safe_load(template.render(merged_manifest_properties, consumes: links))
expect(template_hash['legacy_md5_buildpack_paths_enabled']).to be(false)
end
end
end
end
end
end
Expand Down