Skip to content

Commit

Permalink
Fix application rename with CNB lifecycle (#4206)
Browse files Browse the repository at this point in the history
* Fix application rename with CNB lifecycle

* Simplified new code

---------

Co-authored-by: Ralf Pannemans <[email protected]>
  • Loading branch information
pbusko and c0d1ngm0nk3y authored Feb 12, 2025
1 parent 0fcb815 commit 47cc2d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cloud_controller/diego/lifecycles/app_cnb_lifecycle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def create_lifecycle_data_model(app)
end

def valid?
!buildpacks.empty?
message.is_a?(AppUpdateMessage) || !buildpacks.empty?
end

def errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ module VCAP::CloudController
it 'invalid' do
expect(lifecycle.valid?).to be(false)
end

context 'during an update' do
let(:message) { VCAP::CloudController::AppUpdateMessage.new(request) }

it 'valid' do
expect(lifecycle.valid?).to be(true)
end
end
end

context 'with buildpacks' do
Expand Down

0 comments on commit 47cc2d3

Please sign in to comment.