diff options
author | John Keiser <john@johnkeiser.com> | 2016-08-17 08:48:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-17 08:48:07 -0700 |
commit | 4da546bd2431a6ecf86d9f709714c3de8b13d8fb (patch) | |
tree | f6eafbf03db3e9b61acc551f9fcc90664955adb4 /spec/integration | |
parent | 5de6251cf05ce43945c23dfdb6fe956bebd9bab7 (diff) | |
parent | 438cd46c773fb752556d1ed61e49ad0a359fc059 (diff) | |
download | chef-4da546bd2431a6ecf86d9f709714c3de8b13d8fb.tar.gz |
Merge pull request #5215 from chef/jk/windows-ruby-2.3
Don't use relative_path_from on glob results
Diffstat (limited to 'spec/integration')
-rw-r--r-- | spec/integration/knife/chef_repo_path_spec.rb | 71 |
1 files changed, 70 insertions, 1 deletions
diff --git a/spec/integration/knife/chef_repo_path_spec.rb b/spec/integration/knife/chef_repo_path_spec.rb index cf12b7ddfe..1388aa8716 100644 --- a/spec/integration/knife/chef_repo_path_spec.rb +++ b/spec/integration/knife/chef_repo_path_spec.rb @@ -48,7 +48,7 @@ describe "chef_repo_path tests", :workstation do directory "chef_repo2" do file "clients/client3.json", {} - file "cookbooks/cookbook3/metadata.rb", "" + file "cookbooks/cookbook3/metadata.rb", "name 'cookbook3'" file "data_bags/bag3/item3.json", {} file "environments/env3.json", {} file "nodes/node3.json", {} @@ -79,6 +79,75 @@ describe "chef_repo_path tests", :workstation do EOM end + it "knife list --local -Rfp --chef-repo-path chef_r~1 / grabs chef_repo2 stuff", :windows_only do + Chef::Config.delete(:chef_repo_path) + knife("list --local -Rfp --chef-repo-path #{path_to('chef_r~1')} /").should_succeed <<EOM +/clients/ +/clients/client3.json +/cookbooks/ +/cookbooks/cookbook3/ +/cookbooks/cookbook3/metadata.rb +/data_bags/ +/data_bags/bag3/ +/data_bags/bag3/item3.json +/environments/ +/environments/env3.json +/nodes/ +/nodes/node3.json +/roles/ +/roles/role3.json +/users/ +/users/user3.json +EOM + end + + it "knife list --local -Rfp --chef-repo-path chef_r~1 / grabs chef_repo2 stuff", :windows_only do + Chef::Config.delete(:chef_repo_path) + knife("list -z -Rfp --chef-repo-path #{path_to('chef_r~1')} /").should_succeed <<EOM +/acls/ +/acls/clients/ +/acls/clients/client3.json +/acls/containers/ +/acls/cookbook_artifacts/ +/acls/cookbooks/ +/acls/cookbooks/cookbook3.json +/acls/data_bags/ +/acls/data_bags/bag3.json +/acls/environments/ +/acls/environments/env3.json +/acls/groups/ +/acls/nodes/ +/acls/nodes/node3.json +/acls/organization.json +/acls/policies/ +/acls/policy_groups/ +/acls/roles/ +/acls/roles/role3.json +/clients/ +/clients/client3.json +/containers/ +/cookbook_artifacts/ +/cookbooks/ +/cookbooks/cookbook3/ +/cookbooks/cookbook3/metadata.rb +/data_bags/ +/data_bags/bag3/ +/data_bags/bag3/item3.json +/environments/ +/environments/env3.json +/groups/ +/invitations.json +/members.json +/nodes/ +/nodes/node3.json +/org.json +/policies/ +/policy_groups/ +/roles/ +/roles/role3.json +EOM + end + context "when all _paths are set to alternates" do before :each do %w{client cookbook data_bag environment node role user}.each do |object_name| |