diff options
author | Adam Ward <adamw@subdesigns.net> | 2016-11-14 14:53:42 +1100 |
---|---|---|
committer | Adam Ward <adamw@subdesigns.net> | 2016-11-21 10:33:42 +1100 |
commit | 948d10e6a683e31ebefd33298a82f5a0fccfdc24 (patch) | |
tree | a0a0e58bea017e7525a83c43887dfbd379d5d47a /spec | |
parent | 7e112b9542f3103c50990c3af337ce5575827e74 (diff) | |
download | chef-948d10e6a683e31ebefd33298a82f5a0fccfdc24.tar.gz |
Correct SFTP remote_file tests
Incorrectly tested 'ftp' scheme.
Fixes: #4750
Obvious fix.
Signed-off-by: Adam Ward <adamw@subdesigns.net>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/provider/remote_file/sftp_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/provider/remote_file/sftp_spec.rb b/spec/unit/provider/remote_file/sftp_spec.rb index 7be507dc89..ddab1605f0 100644 --- a/spec/unit/provider/remote_file/sftp_spec.rb +++ b/spec/unit/provider/remote_file/sftp_spec.rb @@ -117,7 +117,7 @@ describe Chef::Provider::RemoteFile::SFTP do end context "and the URI specifies an alternate port" do - let(:uri) { URI.parse("ftp://conan:cthu1hu@opscode.com:8021/seattle.txt") } + let(:uri) { URI.parse("sftp://conan:cthu1hu@opscode.com:8021/seattle.txt") } it "should connect on an alternate port when one is provided" do expect(Net::SFTP).to receive(:start).with("opscode.com:8021", "conan", :password => "cthu1hu") @@ -127,10 +127,10 @@ describe Chef::Provider::RemoteFile::SFTP do end context "and the uri specifies a nested path" do - let(:uri) { URI.parse("ftp://conan:cthu1hu@opscode.com/the/whole/path/seattle.txt") } + let(:uri) { URI.parse("sftp://conan:cthu1hu@opscode.com/the/whole/path/seattle.txt") } it "should fetch the file from the correct path" do - expect(sftp).to receive(:download!).with("the/whole/path/seattle.txt", "/tmp/somedir/remote-file-sftp-backend-spec-test") + expect(sftp).to receive(:download!).with("/the/whole/path/seattle.txt", "/tmp/somedir/remote-file-sftp-backend-spec-test") fetcher.fetch end end |