Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make user and client keys endpoints pass Pedant specs #199

Merged
merged 2 commits into from
Feb 24, 2016

Conversation

jrunning
Copy link
Contributor

Depends on chef/chef#4587 and chef/chef-server#740.

  • Implement ActorKeyEndpoint, ActorDefaultKeyEndpoint, ActorKeysEndpoint.
  • Implement user, client keys in ActorEndpoint#delete, #put.
  • RestBase
    • Fix RestErrorResponse exceptions to report actual rest_path
      instead associated with the failed data store operation instead of
      request.rest_path.
    • Move json_response, already_json_response args request_version
      and response_version into options hash; add docs.
  • DataError, RestErrorResponse: Pass useful message text to super.
  • RestRouter: Clean up logging
    • Print request methods, paths and bodies more readably for log_level >= INFO.
    • Pretty-print RestRequest objects (only printed when log_level == DEBUG).
  • Server: Change default log_level to :warn (to enable logging cleanup above).
  • Rakefile, spec/run_oc_pedant.rb
    • Consume RSpec, Pedant options from ENV['RSPEC_OPTS'], ENV['PEDANT_OPTS'] (see rake -D).
    • Consume ENV['LOG_LEVEL' (see rake -D).
    • Clean up ChefZero::Server default opts and move duplicated logic to start_chef_server method.

# We grab the old data to trigger a 404 if it doesn't exist
get_data(request, data_path(request))

set_data(request, path, request.body)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems odd that this does not need a special case for the default key

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, that does seem odd. I'll take a closer look.

@danielsdeleo
Copy link
Contributor

There were two things I didn't understand. Also, I'm assuming we need to merge the chef change to make travis happy. Everything else is 👍 Really like the logging and test running improvements.

- Implement ActorKeyEndpoint, ActorKeysEndpoint.
- Implement user, client keys in `ActorEndpoint#delete`, `#put`.

- RestBase
  - Fix RestErrorResponse exceptions to report actual `rest_path`
    instead associated with the failed data store operation instead of
    `request.rest_path`.
  - Move `json_response`, `already_json_response` args `request_version`
    and `response_version` into options hash; add docs.

- DataError, RestErrorResponse: Pass useful message text to `super`.

- RestRouter: Clean up logging
  - Print request methods, paths and bodies more readably for log_level >= INFO.
  - Pretty-print RestRequest objects (only printed when log_level == DEBUG).

- Server: Change default log_level to `:warn` (to enable logging cleanup above).

- `Rakefile`, `spec/run_oc_pedant.rb`
  - Consume RSpec, Pedant options from `ENV['RSPEC_OPTS']`, `ENV['PEDANT_OPTS']` (see `rake -D`).
  - Consume `ENV['LOG_LEVEL'` (see `rake -D`).
  - Clean up ChefZero::Server default opts and move duplicated logic to `start_chef_server` method.
@danielsdeleo
Copy link
Contributor

@chef/client-dev-tools can I get another review on this?

@jkeiser
Copy link
Contributor

jkeiser commented Feb 24, 2016

👍, this has a lot of great simplification too! Awesome job.

@danielsdeleo danielsdeleo merged commit b0971ce into master Feb 24, 2016
@danielsdeleo danielsdeleo deleted the jr/pedant-keys-2 branch February 25, 2016 06:20
@thommay thommay added Type: Enhancement Adds new functionality. and removed enhancement labels Jan 24, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants