summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2021-11-08 21:56:21 -0800
committerGitHub <noreply@github.com>2021-11-08 21:56:21 -0800
commitb8c7740ed8c1c7c1e74fd670609a428aa1f94419 (patch)
tree0831a05ff3d961c0bec302cbef997887fe1c8cdd
parentc54a2b4981d37258fb3658549d14a2e33d8325e5 (diff)
parentb5cb776af13c78639639dd01e3e4dc70190a4c9a (diff)
downloadchef-b8c7740ed8c1c7c1e74fd670609a428aa1f94419.tar.gz
Merge pull request #12260 from chef/lcg/fix-chef-16-knife-policy-group-list
Backport CI fixes for policy_group_list changes in knife
-rw-r--r--spec/integration/knife/delete_spec.rb2
-rw-r--r--spec/integration/knife/download_spec.rb4
-rw-r--r--spec/integration/knife/upload_spec.rb11
3 files changed, 8 insertions, 9 deletions
diff --git a/spec/integration/knife/delete_spec.rb b/spec/integration/knife/delete_spec.rb
index 851c492a66..01c58d85e8 100644
--- a/spec/integration/knife/delete_spec.rb
+++ b/spec/integration/knife/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/spec/integration/knife/download_spec.rb b/spec/integration/knife/download_spec.rb
index 7bdec7b356..7b596c5c12 100644
--- a/spec/integration/knife/download_spec.rb
+++ b/spec/integration/knife/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/spec/integration/knife/upload_spec.rb b/spec/integration/knife/upload_spec.rb
index 37cfcefa32..4381d55399 100644
--- a/spec/integration/knife/upload_spec.rb
+++ b/spec/integration/knife/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" },
},
}