Skip to content

Commit 9a4591e

Browse files
committed
Add user attribute to manifest diffs
1 parent c33dd07 commit 9a4591e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/actions/space_diff_manifest.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def filter_manifest_app_hash(manifest_app_hash)
9898
hash.slice(
9999
'type',
100100
'command',
101+
'user',
101102
'disk_quota',
102103
'log-rate-limit-per-second',
103104
'health-check-http-endpoint',

spec/unit/actions/space_diff_manifest_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,16 @@ module VCAP::CloudController
8484
end
8585

8686
context 'processes' do
87-
context 'when processes are added' do
87+
context 'when processes are updated' do
8888
before do
8989
default_manifest['applications'][0]['processes'][0]['memory'] = '2048M'
90+
default_manifest['applications'][0]['processes'][0]['user'] = 'ContainerUser'
9091
end
9192

9293
it 'returns the correct diff' do
9394
expect(subject).to contain_exactly(
94-
{ 'op' => 'replace', 'path' => '/applications/0/processes/0/memory', 'was' => "#{process1.memory}M", 'value' => '2048M' }
95+
{ 'op' => 'replace', 'path' => '/applications/0/processes/0/memory', 'was' => "#{process1.memory}M", 'value' => '2048M' },
96+
{ 'op' => 'add', 'path' => '/applications/0/processes/0/user', 'value' => 'ContainerUser' }
9597
)
9698
end
9799
end

0 commit comments

Comments
 (0)