Skip to content

Commit

Permalink
Use BOSH links for temp_enable_v2 property
Browse files Browse the repository at this point in the history
* avoids redundant configuration
  • Loading branch information
jochenehret committed Nov 5, 2024
1 parent 47f873e commit 73cb8f8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
1 change: 1 addition & 0 deletions jobs/cloud_controller_ng/spec
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ provides:
- cc.statsd_port
- cc.enable_statsd_metrics
- cc.system_hostnames
- cc.temporary_enable_v2
- cc.tls_port
- cc.uaa.client_timeout
- cc.internal_route_vip_range
Expand Down
4 changes: 0 additions & 4 deletions jobs/cloud_controller_worker/spec
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,6 @@ properties:
default: false
description: "Enable development features for monitoring and insight"

cc.temporary_enable_v2:
description: "Enable V2 endpoints"
default: true

cc.newrelic.license_key:
default: ~
description: "The api key for NewRelic"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ db: &db

<% system_domain = p("system_domain") %>

temporary_enable_v2: <%= p("cc.temporary_enable_v2") %>
temporary_enable_v2: <%= link("cloud_controller_internal").p("cc.temporary_enable_v2") %>

uaa:
internal_url: <%= "https://#{p("cc.uaa.internal_url")}:#{p("uaa.ssl.port")}" %>
Expand Down
15 changes: 3 additions & 12 deletions spec/cloud_controller_worker/cloud_controller_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ module Test
'jobs' => {
'enable_dynamic_job_priorities' => false
},
'app_log_revision' => true
'app_log_revision' => true,
'temporary_enable_v2' => true
}
}
end

let(:cloud_controller_internal_link) do
Link.new(name: 'cloud_controller_internal', properties:, instances: [LinkInstance.new(address: 'default_app_ssh_access')])
end
Expand Down Expand Up @@ -264,17 +266,6 @@ module Test
template_hash = YAML.safe_load(template.render(manifest_properties, consumes: links))
expect(template_hash['temporary_enable_v2']).to be(true)
end

context 'when explicitly disabled' do
before do
manifest_properties['cc']['temporary_enable_v2'] = false
end

it 'is false' do
template_hash = YAML.safe_load(template.render(manifest_properties, consumes: links))
expect(template_hash['temporary_enable_v2']).to be(false)
end
end
end
end
end
Expand Down

0 comments on commit 73cb8f8

Please sign in to comment.