Skip to content

Commit 52c4381

Browse files
committed
Use BOSH links for temp_enable_v2 property
* avoids redundant configuration
1 parent 47f873e commit 52c4381

File tree

4 files changed

+5
-16
lines changed

4 files changed

+5
-16
lines changed

jobs/cloud_controller_ng/spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ provides:
211211
- cc.statsd_port
212212
- cc.enable_statsd_metrics
213213
- cc.system_hostnames
214+
- cc.temporary_enable_v2
214215
- cc.tls_port
215216
- cc.uaa.client_timeout
216217
- cc.internal_route_vip_range

jobs/cloud_controller_worker/spec

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,10 +388,6 @@ properties:
388388
default: false
389389
description: "Enable development features for monitoring and insight"
390390

391-
cc.temporary_enable_v2:
392-
description: "Enable V2 endpoints"
393-
default: true
394-
395391
cc.newrelic.license_key:
396392
default: ~
397393
description: "The api key for NewRelic"

jobs/cloud_controller_worker/templates/cloud_controller_ng.yml.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ db: &db
128128

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

131-
temporary_enable_v2: <%= p("cc.temporary_enable_v2") %>
131+
temporary_enable_v2: <%= link("cloud_controller_internal").p("cc.temporary_enable_v2") %>
132132

133133
uaa:
134134
internal_url: <%= "https://#{p("cc.uaa.internal_url")}:#{p("uaa.ssl.port")}" %>

spec/cloud_controller_worker/cloud_controller_worker_spec.rb

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,12 @@ module Test
8080
'jobs' => {
8181
'enable_dynamic_job_priorities' => false
8282
},
83-
'app_log_revision' => true
83+
'app_log_revision' => true,
84+
'temporary_enable_v2' => true
8485
}
8586
}
8687
end
88+
8789
let(:cloud_controller_internal_link) do
8890
Link.new(name: 'cloud_controller_internal', properties:, instances: [LinkInstance.new(address: 'default_app_ssh_access')])
8991
end
@@ -265,16 +267,6 @@ module Test
265267
expect(template_hash['temporary_enable_v2']).to be(true)
266268
end
267269

268-
context 'when explicitly disabled' do
269-
before do
270-
manifest_properties['cc']['temporary_enable_v2'] = false
271-
end
272-
273-
it 'is false' do
274-
template_hash = YAML.safe_load(template.render(manifest_properties, consumes: links))
275-
expect(template_hash['temporary_enable_v2']).to be(false)
276-
end
277-
end
278270
end
279271
end
280272
end

0 commit comments

Comments
 (0)