Skip to content

Commit 00bef7c

Browse files
committed
Fix missing resource_type for clearing app buildpack cache
1 parent acac7b9 commit 00bef7c

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

app/jobs/v3/buildpack_cache_delete.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module VCAP::CloudController
22
module Jobs
33
module V3
44
class BuildpackCacheDelete < VCAP::CloudController::Jobs::CCJob
5-
attr_accessor :resource_type, :resource_guid
5+
attr_accessor :resource_guid
66

77
def initialize(app_guid)
88
@resource_guid = app_guid
@@ -24,6 +24,10 @@ def max_attempts
2424
3
2525
end
2626

27+
def resource_type
28+
'app'
29+
end
30+
2731
def display_name
2832
"#{resource_type}.clear_buildpack_cache"
2933
end

spec/unit/jobs/v3/buildpack_cache_delete_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ module Jobs::V3
5050
expect(job.job_name_in_configuration).to equal(:buildpack_cache_delete)
5151
end
5252
end
53+
54+
describe '#display_name' do
55+
it 'returns the correct display name' do
56+
expect(job.display_name).to eq('app.clear_buildpack_cache')
57+
end
58+
end
5359
end
5460
end
5561
end

0 commit comments

Comments
 (0)