diff options
author | Lamont Granquist <454857+lamont-granquist@users.noreply.github.com> | 2021-10-25 13:52:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 13:52:00 -0700 |
commit | 999729a8a88e559520fd6e983431a8792eba85ea (patch) | |
tree | 04350810490f61f9d0b5ea2dc6411b095014f73a | |
parent | bf6c54fb586e87098d8311d881f80cdd530ecc5c (diff) | |
parent | 89728585bd241f50c71c8648f8a7cd770bf08f6a (diff) | |
download | chef-999729a8a88e559520fd6e983431a8792eba85ea.tar.gz |
Merge pull request #12209 from chef/lcg/fix-policy-group-list-failures
-rw-r--r-- | knife/spec/integration/delete_spec.rb | 2 | ||||
-rw-r--r-- | knife/spec/integration/download_spec.rb | 4 | ||||
-rw-r--r-- | knife/spec/integration/upload_spec.rb | 11 |
3 files changed, 8 insertions, 9 deletions
diff --git a/knife/spec/integration/delete_spec.rb b/knife/spec/integration/delete_spec.rb index e00949e7f4..5a52167858 100644 --- a/knife/spec/integration/delete_spec.rb +++ b/knife/spec/integration/delete_spec.rb @@ -992,7 +992,7 @@ describe "knife delete", :workstation do end it "knife delete /policies/x-1.2.3.json succeeds" do - knife("raw /policies/x/revisions/1.2.3").should_succeed "{\n \"name\": \"x\",\n \"revision_id\": \"1.2.3\",\n \"run_list\": [\n\n ],\n \"cookbook_locks\": {\n\n }\n}\n" + knife("raw /policies/x/revisions/1.2.3").should_succeed "{\n \"policy_group_list\": [\n \"x\"\n ],\n \"name\": \"x\",\n \"revision_id\": \"1.2.3\",\n \"run_list\": [\n\n ],\n \"cookbook_locks\": {\n\n }\n}\n" knife("delete /policies/x-1.2.3.json").should_succeed "Deleted /policies/x-1.2.3.json\n" knife("raw /policies/x/revisions/1.2.3").should_fail(/404/) end diff --git a/knife/spec/integration/download_spec.rb b/knife/spec/integration/download_spec.rb index 29200d66f2..583f4421a6 100644 --- a/knife/spec/integration/download_spec.rb +++ b/knife/spec/integration/download_spec.rb @@ -1276,8 +1276,8 @@ describe "knife download", :workstation do file "members.json", [ "bar" ] file "nodes/x.json", { "normal" => { "tags" => [] } } file "org.json", { "full_name" => "Something" } - file "policies/x-1.0.0.json", {} - file "policies/blah-1.0.0.json", {} + file "policies/x-1.0.0.json", { "policy_group_list" => [ "x" ] } + file "policies/blah-1.0.0.json", { "policy_group_list" => [ "x" ] } file "policy_groups/x.json", { "policies" => { "x" => { "revision_id" => "1.0.0" }, "blah" => { "revision_id" => "1.0.0" } } } file "roles/x.json", {} end diff --git a/knife/spec/integration/upload_spec.rb b/knife/spec/integration/upload_spec.rb index e4bb44ad7e..1d23d8777e 100644 --- a/knife/spec/integration/upload_spec.rb +++ b/knife/spec/integration/upload_spec.rb @@ -1383,8 +1383,8 @@ describe "knife upload", :workstation do file "members.json", [ "bar" ] file "org.json", { "full_name" => "wootles" } file "nodes/x.json", { "normal" => { "tags" => [] } } - file "policies/x-1.0.0.json", {} - file "policies/blah-1.0.0.json", {} + file "policies/x-1.0.0.json", { "policy_group_list" => [ "x" ] } + file "policies/blah-1.0.0.json", { "policy_group_list" => [ "x" ] } file "policy_groups/x.json", { "policies" => { "x" => { "revision_id" => "1.0.0" }, "blah" => { "revision_id" => "1.0.0" } } } file "roles/x.json", {} end @@ -1484,12 +1484,11 @@ describe "knife upload", :workstation do environment "x", { "description" => "foo" } group "x", { "groups" => [ "admin" ] } node "x", { "run_list" => [ "blah" ] } - policy "x", "1.0.0", {} - policy "x", "1.0.1", {} - policy "y", "1.0.0", {} + policy "x", "1.0.0", { "policy_group_list" => [ "x" ] } + policy "y", "1.0.0", { "policy_group_list" => [ "x" ] } policy_group "x", { "policies" => { - "x" => { "revision_id" => "1.0.1" }, + "x" => { "revision_id" => "1.0.0" }, "y" => { "revision_id" => "1.0.0" }, }, } |