summaryrefslogtreecommitdiff
path: root/spec/integration
diff options
context:
space:
mode:
authorSteven Danna <steve@chef.io>2015-10-22 10:53:42 +0100
committerSteven Danna <steve@chef.io>2015-10-23 12:34:58 +0100
commitb036d1542c10a6a4c0910b96a27404735134055a (patch)
tree6a4c8fb64a9fcaae2810c5f1d45298deb61756c6 /spec/integration
parente98d4dafc8121e1adeff580bf5dc15c971e3618f (diff)
downloadchef-b036d1542c10a6a4c0910b96a27404735134055a.tar.gz
Allow downloading of root_files in a chef repositoryssd/download-root-files
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.
Diffstat (limited to 'spec/integration')
-rw-r--r--spec/integration/knife/download_spec.rb9
1 files changed, 9 insertions, 0 deletions
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