diff options
author | John Keiser <john@johnkeiser.com> | 2016-01-13 14:12:21 -0800 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2016-01-15 09:37:43 -0800 |
commit | 7fd174277679739fb2c7aa628a26fade406655df (patch) | |
tree | d54c3928213d080496e2942c196e418c7d18d1e7 /spec/integration | |
parent | 7731eb6e1e93991af1712be35af476063ebcb4ee (diff) | |
download | chef-7fd174277679739fb2c7aa628a26fade406655df.tar.gz |
Get download of cookbook_artifacts working
Diffstat (limited to 'spec/integration')
-rw-r--r-- | spec/integration/knife/download_spec.rb | 11 | ||||
-rw-r--r-- | spec/integration/knife/list_spec.rb | 16 |
2 files changed, 17 insertions, 10 deletions
diff --git a/spec/integration/knife/download_spec.rb b/spec/integration/knife/download_spec.rb index faa640f83b..57229b915a 100644 --- a/spec/integration/knife/download_spec.rb +++ b/spec/integration/knife/download_spec.rb @@ -1148,6 +1148,7 @@ Created /containers/nodes.json Created /containers/policies.json Created /containers/roles.json Created /containers/sandboxes.json +Created /cookbook_artifacts Created /cookbooks Created /data_bags Created /environments @@ -1172,6 +1173,7 @@ EOM # acl_for %w(organizations foo groups blah) client "x", {} cookbook "x", "1.0.0" + cookbook_artifact "x", "1x1", { "metadata.rb" => cb_metadata("x", "1.0.0") } container "x", {} data_bag "x", { "y" => {} } environment "x", {} @@ -1184,7 +1186,7 @@ EOM policy_group "x", { "policies" => { "x" => { "revision_id" => "1.0.0" }, - "blah" => { "revision_id" => "1.0.0" }, + "blah" => { "revision_id" => "1.0.0" } } } role "x", {} @@ -1209,6 +1211,8 @@ EOM knife("download /").should_succeed <<EOM Created /clients/x.json Created /containers/x.json +Created /cookbook_artifacts/x-1x1 +Created /cookbook_artifacts/x-1x1/metadata.rb Created /cookbooks/x Created /cookbooks/x/metadata.rb Created /data_bags/x @@ -1233,6 +1237,7 @@ EOM file "clients/x.json", { "public_key" => ChefZero::PUBLIC_KEY } file "containers/x.json", {} file "cookbooks/x/metadata.rb", cb_metadata("x", "1.0.0") + file "cookbook_artifacts/x-1x1/metadata.rb", cb_metadata("x", "1.0.0") file "data_bags/x/y.json", {} file "environments/x.json", {} file "groups/x.json", {} @@ -1257,6 +1262,7 @@ EOM file "clients/x.json", { "validator" => true } file "containers/x.json", {} file "cookbooks/x/metadata.rb", cb_metadata("x", "1.0.1") + file "cookbook_artifacts/x-1x1/metadata.rb", cb_metadata("x", "1.0.1") file "data_bags/x/y.json", { "a" => "b" } file "environments/x.json", { "description" => "foo" } file "groups/x.json", { "description" => "foo" } @@ -1267,7 +1273,7 @@ EOM file "policy_groups/x.json", { "policies" => { "x" => { "revision_id" => "1.0.1" }, - "y" => { "revision_id" => "1.0.0" }, + "y" => { "revision_id" => "1.0.0" } } } file "roles/x.json", { "run_list" => [ "blah" ] } @@ -1276,6 +1282,7 @@ EOM it "knife download updates everything" do knife("download /").should_succeed <<EOM Updated /clients/x.json +Updated /cookbook_artifacts/x-1x1/metadata.rb Updated /cookbooks/x/metadata.rb Updated /data_bags/x/y.json Updated /environments/x.json diff --git a/spec/integration/knife/list_spec.rb b/spec/integration/knife/list_spec.rb index 544842fe94..85eb959847 100644 --- a/spec/integration/knife/list_spec.rb +++ b/spec/integration/knife/list_spec.rb @@ -893,8 +893,8 @@ EOM container "container2", {} cookbook "cookbook1", "1.0.0" cookbook "cookbook2", "1.0.1", { "recipes" => { "default.rb" => "" } } - cookbook_artifact "cookbook_artifact1", "111" - cookbook_artifact "cookbook_artifact2", "222", { "recipes" => { "default.rb" => "" } } + cookbook_artifact "cookbook_artifact1", "1x1" + cookbook_artifact "cookbook_artifact2", "2x2", { "recipes" => { "default.rb" => "" } } data_bag "bag1", { "item1" => {}, "item2" => {} } data_bag "bag2", { "item1" => {}, "item2" => {} } environment "environment1", {} @@ -980,12 +980,12 @@ EOM /containers/roles.json /containers/sandboxes.json /cookbook_artifacts/ -/cookbook_artifacts/cookbook_artifact1-111/ -/cookbook_artifacts/cookbook_artifact1-111/metadata.rb -/cookbook_artifacts/cookbook_artifact2-222/ -/cookbook_artifacts/cookbook_artifact2-222/metadata.rb -/cookbook_artifacts/cookbook_artifact2-222/recipes/ -/cookbook_artifacts/cookbook_artifact2-222/recipes/default.rb +/cookbook_artifacts/cookbook_artifact1-1x1/ +/cookbook_artifacts/cookbook_artifact1-1x1/metadata.rb +/cookbook_artifacts/cookbook_artifact2-2x2/ +/cookbook_artifacts/cookbook_artifact2-2x2/metadata.rb +/cookbook_artifacts/cookbook_artifact2-2x2/recipes/ +/cookbook_artifacts/cookbook_artifact2-2x2/recipes/default.rb /cookbooks/ /cookbooks/cookbook1/ /cookbooks/cookbook1/metadata.rb |