Skip to content

Commit

Permalink
Revert "Update diff redaction to show persistent_disk_fs"
Browse files Browse the repository at this point in the history
[#112825405]

Changes should be made on addons branch not in develop branch.

This reverts commit 93ba280.
  • Loading branch information
Bosh Robinson committed Feb 4, 2016
1 parent fadf4b9 commit 9038f4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bosh-director/lib/bosh/director/manifest/diff_lines.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class DiffLines < Array

REDACT_KEY_NAMES = %w(
properties
bosh
env
)

def order
Expand Down
17 changes: 7 additions & 10 deletions bosh-director/spec/unit/manifest/diff_lines_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,24 +245,22 @@ module Bosh::Director
diff_lines << Line.new(0, 'resource_pools:', nil)
diff_lines << Line.new(0, '- name: foo', nil)
diff_lines << Line.new(1, 'env:', nil)
diff_lines << Line.new(2, 'bosh:', nil)
diff_lines << Line.new(3, 'password: bar', nil)
diff_lines << Line.new(2, 'persistent_disk_fs: xfs', nil)
diff_lines << Line.new(2, 'user: foo', nil)
diff_lines << Line.new(2, 'password: bar', nil)
diff_lines << Line.new(0, 'jobs:', nil)
diff_lines << Line.new(0, '- name: job1', nil)
diff_lines << Line.new(0, ' env:', nil)
diff_lines << Line.new(0, ' bosh:', nil)
diff_lines << Line.new(0, ' password: foobar', nil)
end

it 'redacts password env values' do
it 'redacts all env values' do
expect(diff_lines.map(&:to_s)).to eq([
'resource_pools:',
'- name: foo',
' env:',
' bosh:',
' password: bar',
' persistent_disk_fs: xfs',
' user: foo',
' password: bar',
'jobs:',
'- name: job1',
' env:',
Expand All @@ -276,9 +274,8 @@ module Bosh::Director
'resource_pools:',
'- name: foo',
' env:',
' bosh:',
' password: <redacted>',
' persistent_disk_fs: xfs',
' user: <redacted>',
' password: <redacted>',
'jobs:',
'- name: job1',
' env:',
Expand Down

0 comments on commit 9038f4f

Please sign in to comment.