Skip to content

Commit

Permalink
Don't call sudo when using stemcell-copy script
Browse files Browse the repository at this point in the history
The previous commit moves the `sudo` inside of the stemcell-copy script,
we simply missed this unit test assertion.

[#177401654] Add heavy stemcell support to Ops Manager AWS

Signed-off-by: Brian Cunnie <[email protected]>
  • Loading branch information
ystros authored and cunnie committed Apr 5, 2021
1 parent a3d6589 commit 7e83b93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bosh_aws_cpi/spec/unit/stemcell_creator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ module Bosh::AwsCloud
allow(creator).to receive(:find_in_path).and_return('/path/to/stemcell-copy')
result = double('result', :output => 'output')

cmd = 'sudo -n /path/to/stemcell-copy /path/to/image /dev/volume 2>&1'
cmd = '/path/to/stemcell-copy /path/to/image /dev/volume 2>&1'
expect(creator).to receive(:sh).with(cmd).and_return(result)

creator.send(:copy_root_image)
Expand All @@ -157,7 +157,7 @@ module Bosh::AwsCloud
result = double('result', :output => 'output')

stemcell_copy = File.expand_path('../../../../bosh_aws_cpi/bin/stemcell-copy', __FILE__)
cmd = "sudo -n #{stemcell_copy} /path/to/image /dev/volume 2>&1"
cmd = "#{stemcell_copy} /path/to/image /dev/volume 2>&1"
expect(creator).to receive(:sh).with(cmd).and_return(result)

creator.send(:copy_root_image)
Expand Down

0 comments on commit 7e83b93

Please sign in to comment.