summaryrefslogtreecommitdiff
path: root/spec/unit/config_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* s/stub!/stub/gLamont Granquist2014-01-291-4/+4
| | | | fix deprecation warnings
* CHEF-4725: Validate 'log_location' setting on log initializationNikhil Benesch2014-01-201-30/+0
| | | | | | | | | | | | | | Previously, a Mixlib::Config setter method verified that 'log_location' was set to a writeable file or a valid IO stream. Due to the way Mixlib::Config handles `default` and `merge!`, this setter method would not fire if the 'log_location' was left unconfigured or if it was set on the command line, resulting in inconsistent error handling. This commit moves the validation logic out of the configuration layer and into the log initializion layer. This ensures that error handling is consistent, regardless of where the 'log_location' setting is configured. Validation logic is also simplified, relying on the MonoLogger class to open and configure any necessary IO streams.
* Allow single letter usernames.Matthew M. Boedicker2013-11-061-0/+10
| | | | | On non-Windows platforms single letter usernames are valid, so make the valid user regex allow them.
* [CHEF-4363] Remove unnecessary restoration of Chef::ConfigBryan McLellan2013-11-061-4/+0
|
* [CHEF-4363] Allow adding event_handlers via config fileRanjib Dey2013-11-061-0/+14
|
* Default value for ssl_ca_file should be nil only on UNIX.sersut2013-10-211-2/+8
|
* Merge branch 'auto-configure-windows-cacert'danielsdeleo2013-10-181-0/+30
| | | | Fixes CHEF-4649 https://tickets.opscode.com/browse/CHEF-4649
* Add a root config_dir config optiondanielsdeleo2013-10-171-0/+64
| | | | | Also, refactor path joins in Config to a method that will support components containing a trailing separator or not.
* Remove config reload hacksdanielsdeleo2013-10-171-9/+0
| | | | | mixlib-config 2.0 takes care of this without needing to reload config.rb over and over.
* Don't bother cleaning up Chef::Config after tests or initializing things to ↵John Keiser2013-09-161-4/+0
| | | | default values before
* Make formatters clear with Chef::Config.resetJohn Keiser2013-09-161-13/+5
|
* Reset configuration before each testJohn Keiser2013-09-161-5/+0
|
* Use Chef::Config.reset in tests instead of save/load configJohn Keiser2013-09-131-5/+9
|
* added a test for CHEF-4114Yoni Yalovitsky2013-05-301-0/+8
|
* Adding support for environments when running under chef-solo.Nick Stielau2013-05-301-0/+11
| | | | | This commit refactors and rebases Kyle Goodwin's original work for CHEF-3356, as per Bryan McLellan's 12/17 comments.
* [CHEF-4176] remove unneeded aliases for chef_server_urldanielsdeleo2013-05-101-23/+21
|
* [CHEF-4106] Remove obsolete default configurationTeemu Matilainen2013-05-101-25/+1
| | | | | | Remove default Chef::Config keys that are not used any more. Most (if not all) of these were used by the Chef server that is now a separate project.
* [CHEF-4011] use `platform_specific_path` helper in specsSeth Chisamore2013-04-171-7/+5
| | | | | | | | | | | | | | | | This will fix the following test failures when specs are run on Windows: 1) Chef::Config Chef::Config[:encrypted_data_bag_secret] /etc/chef/encrypted_data_bag_secret exists sets the value to /etc/chef/encrypted_data_bag_secret Failure/Error: require 'chef/config' <File (class)> received :exist? with unexpected arguments expected: ("/etc/chef/encrypted_data_bag_secret") got: ("C:\\chef\\encrypted_data_bag_secret") Please stub a default value first if message might be received with other args as well. # C:/jenkins/workspace/chef-ruby1.9.2-windows/lib/chef/config.rb:280:in `<class:Config>' # C:/jenkins/workspace/chef-ruby1.9.2-windows/lib/chef/config.rb:25:in `<class:Chef>' # C:/jenkins/workspace/chef-ruby1.9.2-windows/lib/chef/config.rb:24:in `<top (required)>' # C:/jenkins/workspace/chef-ruby1.9.2-windows/spec/unit/config_spec.rb:273:in `require' # C:/jenkins/workspace/chef-ruby1.9.2-windows/spec/unit/config_spec.rb:273:in `block (3 levels) in <top (required)>'
* removing an_return to as its deprecatedRanjib Dey2013-04-111-2/+2
|
* Fix trailing whitespace. >_<Seth Chisamore2013-04-111-2/+2
|
* [CHEF-4011] move default secret file path to Chef::ConfigSeth Chisamore2013-04-111-0/+27
| | | | | | | | | | * Remove references to DEFAULT_SECRET_FILE from `Chef::EncryptedDataBagItem`. * Add new `:encrypted_data_bag_secret` value to `Chef::Config` * Ensure Chef::Config[:encrypted_data_bag_secret] is nil if the secret does not exist at the default path. * Updated test coverage in `config_spec` and `encrypted_data_bag_item_spec`.
* Merge branch '10-stable' into integrate-chef-10-18-0danielsdeleo2013-01-171-0/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitattributes chef-expander/Rakefile chef-expander/lib/chef/expander/version.rb chef-server-api/Rakefile chef-server-api/chef-server-api.gemspec chef-server-api/lib/chef-server-api/version.rb chef-server-webui/Rakefile chef-server-webui/chef-server-webui.gemspec chef-server-webui/lib/chef-server-webui/version.rb chef-server/Rakefile chef-server/lib/chef-server/version.rb chef-solr/lib/chef/solr/version.rb chef.gemspec chef/Rakefile chef/spec/support/platform_helpers.rb chef/spec/support/shared/functional/file_resource.rb chef/spec/unit/api_client_spec.rb chef/spec/unit/provider/directory_spec.rb ci/jenkins_run_tests.bat ci/jenkins_run_tests.sh distro/common/html/chef-client.8.html distro/common/html/chef-expander.8.html distro/common/html/chef-expanderctl.8.html distro/common/html/chef-server-webui.8.html distro/common/html/chef-server.8.html distro/common/html/chef-shell.1.html distro/common/html/chef-solo.8.html distro/common/html/chef-solr.8.html distro/common/html/knife-bootstrap.1.html distro/common/html/knife-client.1.html distro/common/html/knife-configure.1.html distro/common/html/knife-cookbook-site.1.html distro/common/html/knife-cookbook.1.html distro/common/html/knife-data-bag.1.html distro/common/html/knife-environment.1.html distro/common/html/knife-exec.1.html distro/common/html/knife-index.1.html distro/common/html/knife-node.1.html distro/common/html/knife-role.1.html distro/common/html/knife-search.1.html distro/common/html/knife-ssh.1.html distro/common/html/knife-status.1.html distro/common/html/knife-tag.1.html distro/common/html/knife.1.html distro/common/man/man1/chef-shell.1 distro/common/man/man1/knife-bootstrap.1 distro/common/man/man1/knife-client.1 distro/common/man/man1/knife-configure.1 distro/common/man/man1/knife-cookbook-site.1 distro/common/man/man1/knife-cookbook.1 distro/common/man/man1/knife-data-bag.1 distro/common/man/man1/knife-environment.1 distro/common/man/man1/knife-exec.1 distro/common/man/man1/knife-index.1 distro/common/man/man1/knife-node.1 distro/common/man/man1/knife-role.1 distro/common/man/man1/knife-search.1 distro/common/man/man1/knife-ssh.1 distro/common/man/man1/knife-status.1 distro/common/man/man1/knife-tag.1 distro/common/man/man1/knife.1 distro/common/man/man8/chef-client.8 distro/common/man/man8/chef-expander.8 distro/common/man/man8/chef-expanderctl.8 distro/common/man/man8/chef-server-webui.8 distro/common/man/man8/chef-server.8 distro/common/man/man8/chef-solo.8 distro/common/man/man8/chef-solr.8 lib/chef/api_client.rb lib/chef/rest.rb lib/chef/version.rb spec/functional/knife/ssh_spec.rb spec/functional/resource/cookbook_file_spec.rb spec/spec_helper.rb spec/stress/win32/security_spec.rb spec/support/shared/functional/securable_resource.rb spec/unit/config_spec.rb spec/unit/knife/ssh_spec.rb
* | Change default output to formatters when in consoledanielsdeleo2012-11-201-0/+45
| |
* | [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+215
|/ | | | The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!
* big refactor of the repo layout. move to a chef gem and a chef-server gem ↵Ezra Zygmuntowicz2008-10-081-91/+0
| | | | all with proper deps
* Changing the license on the spec files as wellAdam Jacob2008-08-171-13/+11
|
* Working on network layerAdam Jacob2008-05-191-0/+6
|
* The symlink provider should set the source_file to an empty string if the ↵Adam Jacob2008-05-011-1/+1
| | | | links don't exist
* Adding the Params::Validate mixin, refactored Chef::Config to be a ↵Adam Jacob2008-04-071-18/+33
| | | | singleton, Implemented require_recipe
* Added rcov coverage, lots of tests, definitions, node supportAdam Jacob2008-03-101-0/+72