summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef_zero/endpoints/controls_endpoint.rb15
-rw-r--r--lib/chef_zero/server.rb2
-rw-r--r--spec/run_oc_pedant.rb1
3 files changed, 17 insertions, 1 deletions
diff --git a/lib/chef_zero/endpoints/controls_endpoint.rb b/lib/chef_zero/endpoints/controls_endpoint.rb
new file mode 100644
index 0000000..5790d7f
--- /dev/null
+++ b/lib/chef_zero/endpoints/controls_endpoint.rb
@@ -0,0 +1,15 @@
+module ChefZero
+ module Endpoints
+ # /organizations/ORG/controls
+ class ControlsEndpoint < RestBase
+ # ours is not to wonder why; ours is but to make the pedant specs pass.
+ def get(request)
+ error(410, "Server says 410, chef-zero says 410.")
+ end
+
+ def post(request)
+ error(410, "Server says 410, chef-zero says 410.")
+ end
+ end
+ end
+end
diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb
index df97c88..d6f27c4 100644
--- a/lib/chef_zero/server.rb
+++ b/lib/chef_zero/server.rb
@@ -50,6 +50,7 @@ require 'chef_zero/endpoints/cookbook_artifact_endpoint'
require 'chef_zero/endpoints/cookbook_artifact_identifier_endpoint'
require 'chef_zero/endpoints/containers_endpoint'
require 'chef_zero/endpoints/container_endpoint'
+require 'chef_zero/endpoints/controls_endpoint'
require 'chef_zero/endpoints/dummy_endpoint'
require 'chef_zero/endpoints/data_bags_endpoint'
require 'chef_zero/endpoints/data_bag_endpoint'
@@ -563,6 +564,7 @@ module ChefZero
[ "/dummy", DummyEndpoint.new(self) ],
[ "/organizations/*/clients", ActorsEndpoint.new(self) ],
[ "/organizations/*/clients/*", ActorEndpoint.new(self) ],
+ [ "/organizations/*/controls", ControlsEndpoint.new(self) ],
[ "/organizations/*/cookbooks", CookbooksEndpoint.new(self) ],
[ "/organizations/*/cookbooks/*", CookbookEndpoint.new(self) ],
[ "/organizations/*/cookbooks/*/*", CookbookVersionEndpoint.new(self) ],
diff --git a/spec/run_oc_pedant.rb b/spec/run_oc_pedant.rb
index a064618..cb24122 100644
--- a/spec/run_oc_pedant.rb
+++ b/spec/run_oc_pedant.rb
@@ -101,7 +101,6 @@ begin
#
# ...but we're not there yet
'--skip-keys',
- '--skip-controls',
'--skip-acl',
# Chef Zero does not intend to support validation the way erchef does.