diff options
author | dmitrys <dmitrys@northernlight.com> | 2017-10-03 11:07:00 -0400 |
---|---|---|
committer | dmitrys <dmitrys@northernlight.com> | 2017-10-03 11:07:00 -0400 |
commit | 68e9f4618bc6432023f8327cfce775618806fa9e (patch) | |
tree | 0bf6e37f83bafc8cb0f5ca842efccd16c32e305c /spec/integration | |
parent | 85653e8f25c19273fde0d8d512db29ef13c2a579 (diff) | |
download | chef-68e9f4618bc6432023f8327cfce775618806fa9e.tar.gz |
Updated specs for chef_fs_data_store after switching to use metadata
Signed-off-by: dmitrys <dmitrys@northernlight.com>
Diffstat (limited to 'spec/integration')
-rw-r--r-- | spec/integration/knife/chef_fs_data_store_spec.rb | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/spec/integration/knife/chef_fs_data_store_spec.rb b/spec/integration/knife/chef_fs_data_store_spec.rb index 02508b799d..ff674082b7 100644 --- a/spec/integration/knife/chef_fs_data_store_spec.rb +++ b/spec/integration/knife/chef_fs_data_store_spec.rb @@ -28,6 +28,7 @@ describe "ChefFSDataStore tests", :workstation do let(:cookbook_x_100_metadata_rb) { cb_metadata("x", "1.0.0") } let(:cookbook_z_100_metadata_rb) { cb_metadata("z", "1.0.0") } + let(:cookbook_y_102_metadata_rb) { cb_metadata("z", "1.0.2") } describe "with repo mode 'hosted_everything' (default)" do before do @@ -39,6 +40,8 @@ describe "ChefFSDataStore tests", :workstation do file "clients/x.json", {} file "cookbook_artifacts/x-111/metadata.rb", cookbook_x_100_metadata_rb file "cookbooks/x/metadata.rb", cookbook_x_100_metadata_rb + file "cookbooks/y/metadata.rb", cookbook_y_102_metadata_rb + file "cookbooks/z/metadata.rb", cookbook_z_100_metadata_rb file "data_bags/x/y.json", {} file "environments/x.json", {} file "nodes/x.json", {} @@ -64,6 +67,7 @@ describe "ChefFSDataStore tests", :workstation do /acls/cookbook_artifacts/x.json /acls/cookbooks/ /acls/cookbooks/x.json +/acls/cookbooks/z.json /acls/data_bags/ /acls/data_bags/x.json /acls/environments/ @@ -84,11 +88,13 @@ describe "ChefFSDataStore tests", :workstation do /containers/ /containers/x.json /cookbook_artifacts/ -/cookbook_artifacts/x-111/ -/cookbook_artifacts/x-111/metadata.rb +/cookbook_artifacts/x-1.0.0/ +/cookbook_artifacts/x-1.0.0/metadata.rb /cookbooks/ /cookbooks/x/ /cookbooks/x/metadata.rb +/cookbooks/z/ +/cookbooks/z/metadata.rb /data_bags/ /data_bags/x/ /data_bags/x/y.json @@ -111,6 +117,12 @@ EOM end end + context "LIST /TYPE/NAME" do + it "knife cookbook show -z z" do + knife("cookbook show -z z").should_succeed "z 1.0.2 1.0.0\n" + end + end + context "DELETE /TYPE/NAME" do it "knife delete -z /clients/x.json works" do knife("delete -z /clients/x.json").should_succeed "Deleted /clients/x.json\n" @@ -119,7 +131,7 @@ EOM it "knife delete -z -r /cookbooks/x works" do knife("delete -z -r /cookbooks/x").should_succeed "Deleted /cookbooks/x\n" - knife("list -z -Rfp /cookbooks").should_succeed "" + knife("list -z -Rfp /cookbooks").should_succeed "/cookbooks/z/\n/cookbooks/z/metadata.rb\n" end it "knife delete -z -r /data_bags/x works" do @@ -194,7 +206,14 @@ EOM Uploading x [1.0.0] Uploaded 1 cookbook. EOM - knife("list --local -Rfp /cookbooks").should_succeed "/cookbooks/x/\n/cookbooks/x/metadata.rb\n" + knife("list --local -Rfp /cookbooks").should_succeed <<EOM +/cookbooks/x/ +/cookbooks/x/metadata.rb +/cookbooks/y/ +/cookbooks/y/metadata.rb +/cookbooks/z/ +/cookbooks/z/metadata.rb +EOM end it "knife raw -z -i empty.json -m PUT /data/x/y" do |