Skip to content

Commit

Permalink
Add spec for new cloud_controller_ng property
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenehret committed Oct 22, 2024
1 parent 359f78e commit aae7784
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion spec/cloud_controller_ng/cloud_controller_ng_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ module Test
[{ 'description' => 'Cloud Foundry Linux-based filesystem',
'name' => 'cflinuxfs4' }],
'staging_upload_password' => '((cc_staging_upload_password))',
'staging_upload_user' => 'staging_user' },
'staging_upload_user' => 'staging_user',
'temporary_enable_v2' => true },
'ccdb' =>
{ 'databases' => [{ 'name' => 'cloud_controller', 'tag' => 'cc' }],
'db_scheme' => 'mysql',
Expand Down Expand Up @@ -500,6 +501,24 @@ module Test
end
end

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

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

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

context 'when db connection expiration configuration is present' do
before do
merged_manifest_properties['ccdb']['connection_expiration_timeout'] = 3600
Expand Down

0 comments on commit aae7784

Please sign in to comment.