diff options
author | Chris Doherty <cdoherty@chef.io> | 2016-01-25 13:50:26 -0800 |
---|---|---|
committer | Chris Doherty <cdoherty@chef.io> | 2016-01-25 13:50:26 -0800 |
commit | 11a687a19b26f93713226cd205cdc700b340203d (patch) | |
tree | 5d9dc3c491ac1bc1ce3dbcb8816c3820640b1227 /lib | |
parent | 92a55901496a5eb94bd5c84fed95ed7664540858 (diff) | |
download | chef-zero-11a687a19b26f93713226cd205cdc700b340203d.tar.gz |
Return 410 on /controls so we stop skipping that pedant spec.cd/run-controls-specs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef_zero/endpoints/controls_endpoint.rb | 15 | ||||
-rw-r--r-- | lib/chef_zero/server.rb | 2 |
2 files changed, 17 insertions, 0 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) ], |