From b036d1542c10a6a4c0910b96a27404735134055a Mon Sep 17 00:00:00 2001 From: Steven Danna Date: Thu, 22 Oct 2015 10:53:42 +0100 Subject: Allow downloading of root_files in a chef repository A FileSystemEntry with a nil parent is a "root directory" and thus should exists so long as its filesystem path exists. This was preventing the download of files such as invitation.json whose parent directory is a root directory. --- spec/integration/knife/download_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/integration') diff --git a/spec/integration/knife/download_spec.rb b/spec/integration/knife/download_spec.rb index 8842ed5ac4..b8a19061b7 100644 --- a/spec/integration/knife/download_spec.rb +++ b/spec/integration/knife/download_spec.rb @@ -1103,6 +1103,15 @@ EOM before :each do Chef::Config.chef_server_url = URI.join(Chef::Config.chef_server_url, '/organizations/foo') end + when_the_repository 'has existing top level files' do + before do + file 'invitations.json', {} + end + + it "can still download top level files" do + knife('download /invitations.json').should_succeed + end + end when_the_repository 'is empty' do it 'knife download / downloads everything' do -- cgit v1.2.1