summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-10-25 12:49:29 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2021-10-25 12:49:29 -0700
commit89728585bd241f50c71c8648f8a7cd770bf08f6a (patch)
tree04350810490f61f9d0b5ea2dc6411b095014f73a
parentbf6c54fb586e87098d8311d881f80cdd530ecc5c (diff)
downloadchef-lcg/fix-policy-group-list-failures.tar.gz
Fix knife / chef-zero policy_group_list CI failureslcg/fix-policy-group-list-failures
Fixes to our knife tests for changes in the chef-zero/chef-server API Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--knife/spec/integration/delete_spec.rb2
-rw-r--r--knife/spec/integration/download_spec.rb4
-rw-r--r--knife/spec/integration/upload_spec.rb11
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" },
},
}