Skip to content

Commit

Permalink
Disable v2 by default (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanme authored Jan 21, 2025
1 parent 16db6d3 commit 8086985
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ blobs
.final_builds/jobs/**/*.tgz
.final_builds/packages/**/*.tgz
.bundle/
.vscode/
*.swp
*~
*#
Expand Down
2 changes: 1 addition & 1 deletion jobs/cloud_controller_ng/spec
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ properties:

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

cc.directories.tmpdir:
default: "/var/vcap/data/cloud_controller_ng/tmp"
Expand Down
14 changes: 7 additions & 7 deletions spec/cloud_controller_ng/cloud_controller_ng_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module Test
'name' => 'cflinuxfs4' }],
'staging_upload_password' => '((cc_staging_upload_password))',
'staging_upload_user' => 'staging_user',
'temporary_enable_v2' => true },
'temporary_enable_v2' => false },
'ccdb' =>
{ 'databases' => [{ 'name' => 'cloud_controller', 'tag' => 'cc' }],
'db_scheme' => 'mysql',
Expand Down Expand Up @@ -503,19 +503,19 @@ module Test
end

describe 'enable v2 API' do
it 'is by default true' do
it 'is by default false' do
template_hash = YAML.safe_load(template.render(merged_manifest_properties, consumes: links))
expect(template_hash['temporary_enable_v2']).to be(true)
expect(template_hash['temporary_enable_v2']).to be(false)
end

context 'when explicitly disabled' do
context 'when explicitly enabled' do
before do
merged_manifest_properties['cc']['temporary_enable_v2'] = false
merged_manifest_properties['cc']['temporary_enable_v2'] = true
end

it 'is false' do
it 'is true' do
template_hash = YAML.safe_load(template.render(merged_manifest_properties, consumes: links))
expect(template_hash['temporary_enable_v2']).to be(false)
expect(template_hash['temporary_enable_v2']).to be(true)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/cloud_controller_worker/cloud_controller_worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ module Test
'enable_dynamic_job_priorities' => false
},
'app_log_revision' => true,
'temporary_enable_v2' => true,
'temporary_enable_v2' => false,
'packages' => {
'max_valid_packages_stored' => 5
}
Expand Down Expand Up @@ -267,7 +267,7 @@ module Test
describe 'enable v2 API' do
it 'is by default true' do
template_hash = YAML.safe_load(template.render(manifest_properties, consumes: links))
expect(template_hash['temporary_enable_v2']).to be(true)
expect(template_hash['temporary_enable_v2']).to be(false)
end
end

Expand Down

0 comments on commit 8086985

Please sign in to comment.