summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-03-27 17:33:32 -0700
committerdanielsdeleo <dan@getchef.com>2015-03-27 17:33:32 -0700
commitd9fe481bf29f7325a0128fa53777df57f1951359 (patch)
tree18204c7a688c676a50239f0c1a429f9231c8791a
parentac3cce16d349f487cf6493c13e0bcb7d680f1c3d (diff)
downloadchef-zero-partial-revert-1b2a6e5f107254cce8200a4750035b30265ae0c8.tar.gz
Partially Revert 1b2a6e5f107254cce8200a4750035b30265ae0c8partial-revert-1b2a6e5f107254cce8200a4750035b30265ae0c8
Currently, mounting the /users endpoint at the top level when in osc_compat mode causes errrors in the Chef integration tests. This may be due to a misconfiguration in the way Chef implements local mode but I am unable to pinpoint the exact causes right now. In any case, this is the minimal "revert" of 1b2a6e5f107254cce8200a4750035b30265ae0c8 that gets Chef's integration tests working again.
-rw-r--r--lib/chef_zero/server.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb
index fd37200..d78daf5 100644
--- a/lib/chef_zero/server.rb
+++ b/lib/chef_zero/server.rb
@@ -98,7 +98,6 @@ module ChefZero
GLOBAL_ENDPOINTS = [
'/license',
- '/users',
'/version',
]
@@ -464,9 +463,9 @@ module ChefZero
result = if options[:osc_compat]
# OSC-only
[
- [ "/users", ActorsEndpoint.new(self) ],
- [ "/users/*", ActorEndpoint.new(self) ],
- [ "/authenticate_user", OrganizationAuthenticateUserEndpoint.new(self) ],
+ [ "/organizations/*/users", ActorsEndpoint.new(self) ],
+ [ "/organizations/*/users/*", ActorEndpoint.new(self) ],
+ [ "/organizations/*/authenticate_user", OrganizationAuthenticateUserEndpoint.new(self) ],
]
else
# EC-only
@@ -557,6 +556,7 @@ module ChefZero
return proc do |env|
begin
prefix = global_endpoint?(env['PATH_INFO']) ? [] : rest_base_prefix
+
request = RestRequest.new(env, prefix)
if @on_request_proc
@on_request_proc.call(request)