diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-02-28 16:45:21 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-28 16:45:21 -0800 |
commit | 2757379abb86a6f698b02930b3c2d0ae515beb8d (patch) | |
tree | e21c995da0025be2cfd8ca9f55a147011c816ee1 | |
parent | ef11843d6ce1f1553ec4b76deab6faad05cc08ff (diff) | |
parent | 815c62dbfd22396d7279c09f038e7087b7343b0b (diff) | |
download | chef-2757379abb86a6f698b02930b3c2d0ae515beb8d.tar.gz |
Merge pull request #5833 from chef/lcg/bump-to-chef-13
bump major to chef-13
59 files changed, 387 insertions, 781 deletions
diff --git a/.travis.yml b/.travis.yml index 279dcd0929..e7f082afd8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -99,10 +99,13 @@ matrix: TEST_GEM: halite script: tasks/bin/run_external_test $TEST_GEM rake spec rvm: 2.3.3 - - env: - TEST_GEM: knife-windows - script: tasks/bin/run_external_test $TEST_GEM rake unit_spec - rvm: 2.3.3 + # this has been broken for some time and running incorrectly, see: + # + # see https://github.com/chef/knife-windows/pull/421 + #- env: + # TEST_GEM: knife-windows + #script: tasks/bin/run_external_test $TEST_GEM rake unit_spec + #rvm: 2.3.3 - env: TEST_GEM: poise script: tasks/bin/run_external_test $TEST_GEM rake spec @@ -11,6 +11,9 @@ source "https://rubygems.org" # of bundler versions prior to 1.12.0 (https://github.com/bundler/bundler/commit/193a14fe5e0d56294c7b370a0e59f93b2c216eed) gem "chef", path: "." +# tracking master of ohai for chef-13.0 development, this should be able to be deleted after release +gem "ohai", git: "https://github.com/chef/ohai.git" + gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.exist?(File.expand_path("../chef-config", __FILE__)) gem "rake" gem "bundler" @@ -34,9 +37,9 @@ group(:integration) do gem "chef-provisioning" gem "chef-sugar" gem "chefspec" - gem "halite" - gem "poise" - gem "poise-boiler" + gem "halite", git: "https://github.com/poise/halite.git" + gem "poise", git: "https://github.com/poise/poise.git" + gem "poise-boiler", git: "https://github.com/poise/poise-boiler.git" gem "knife-windows" gem "foodcritic" diff --git a/Gemfile.lock b/Gemfile.lock index e712ef3f51..3f58d45548 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/chef/chef-server - revision: 53b28425d56005a92b0e3bb153f95b505168354a + revision: 8944bea554c88a83696576463ca11354c5713170 specs: oc-chef-pedant (2.2.0) activesupport (>= 4.2.7.1, < 6.0) @@ -16,7 +16,7 @@ GIT GIT remote: https://github.com/chef/chefstyle.git - revision: 7e47afd6141d3c44a11322916e3fc85c89aa9b59 + revision: b2bf89dd11270e169fd2315495c98095d4a19090 branch: master specs: chefstyle (0.5.0) @@ -36,6 +36,73 @@ GIT retriable (>= 1.4) GIT + remote: https://github.com/chef/ohai.git + revision: cd241b6cd73d2d103145c27bda1ca8700a777a4d + specs: + ohai (13.0.0) + chef-config (>= 12.5.0.alpha.1, < 14) + ffi (~> 1.9) + ffi-yajl (~> 2.2) + ipaddress + mixlib-cli + mixlib-config (~> 2.0) + mixlib-log (>= 1.7.1, < 2.0) + mixlib-shellout (~> 2.0) + plist (~> 3.1) + systemu (~> 2.6.4) + wmi-lite (~> 1.0) + +GIT + remote: https://github.com/poise/halite.git + revision: b414e0995d12f8b563f6e881e2a9e25c4563c22e + specs: + halite (1.4.1.pre) + bundler + chef (>= 12.0, < 14.0) + stove (~> 4.0) + thor + +GIT + remote: https://github.com/poise/poise-boiler.git + revision: 25dc08432ac88a3f017467f4ca3918503f761c0d + specs: + poise-boiler (1.13.3.pre) + bundler + chefspec (~> 5.0) + codeclimate-test-reporter (~> 0.4) + codecov (~> 0.0, >= 0.0.2) + foodcritic (>= 7, < 9) + fuubar (~> 2.0) + git (~> 1.2) + halite (~> 1.2) + kitchen-docker (>= 2.6.0.rc.0) + kitchen-ec2 (~> 1.0) + kitchen-sync (~> 2.1) + kitchen-vagrant + mixlib-shellout (>= 1.4, < 3.0) + poise-profiler (~> 1.0) + pry + pry-byebug + rake (>= 10.4, < 12.0) + rspec (~> 3.2) + rspec-its (~> 1.2) + simplecov (~> 0.9) + test-kitchen (~> 1.7, >= 1.7.1) + travis (~> 1.8, >= 1.8.1) + vagrant-wrapper + winrm (>= 1.6, < 3) + winrm-fs (>= 0.4, < 2) + yard (~> 0.8) + yard-classmethods (~> 1.0) + +GIT + remote: https://github.com/poise/poise.git + revision: 3da48ce71b4f7c70013fe455c3bf3643e8f94ead + specs: + poise (2.7.3.pre) + halite (~> 1.0) + +GIT remote: https://github.com/rubysec/bundler-audit.git revision: 6eb5a81e9b184fbb8db03f3e57dc758c65dd7383 specs: @@ -46,10 +113,10 @@ GIT PATH remote: . specs: - chef (12.19.39) + chef (13.0.0) addressable bundler (>= 1.10) - chef-config (= 12.19.39) + chef-config (= 13.0.0) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -64,7 +131,7 @@ PATH net-sftp (~> 2.1, >= 2.1.2) net-ssh (>= 2.9, < 5.0) net-ssh-multi (~> 1.2, >= 1.2.1) - ohai (>= 8.6.0.alpha.1, < 13) + ohai (~> 13.0) plist (~> 3.2) proxifier (~> 1.0) rspec-core (~> 3.5) @@ -75,10 +142,10 @@ PATH specinfra (~> 2.10) syslog-logger (~> 1.6) uuidtools (~> 2.1.5) - chef (12.19.39-universal-mingw32) + chef (13.0.0-universal-mingw32) addressable bundler (>= 1.10) - chef-config (= 12.19.39) + chef-config (= 13.0.0) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -94,7 +161,7 @@ PATH net-sftp (~> 2.1, >= 2.1.2) net-ssh (>= 2.9, < 5.0) net-ssh-multi (~> 1.2, >= 1.2.1) - ohai (>= 8.6.0.alpha.1, < 13) + ohai (~> 13.0) plist (~> 3.2) proxifier (~> 1.0) rspec-core (~> 3.5) @@ -119,7 +186,7 @@ PATH PATH remote: chef-config specs: - chef-config (12.19.39) + chef-config (13.0.0) addressable fuzzyurl mixlib-config (~> 2.0) @@ -136,15 +203,15 @@ GEM addressable (2.4.0) appbundler (0.10.0) mixlib-cli (~> 1.4) - artifactory (2.6.0) + artifactory (2.7.0) ast (2.3.0) - aws-sdk (2.7.7) - aws-sdk-resources (= 2.7.7) - aws-sdk-core (2.7.7) + aws-sdk (2.8.0) + aws-sdk-resources (= 2.8.0) + aws-sdk-core (2.8.0) aws-sigv4 (~> 1.0) jmespath (~> 1.0) - aws-sdk-resources (2.7.7) - aws-sdk-core (= 2.7.7) + aws-sdk-resources (2.8.0) + aws-sdk-core (= 2.8.0) aws-sigv4 (1.0.0) backports (3.6.8) binding_of_caller (0.7.2) @@ -154,13 +221,14 @@ GEM chef-api (0.7.0) logify (~> 0.1) mime-types - chef-provisioning (2.1.0) + chef-provisioning (2.1.1) cheffish (~> 4.0) inifile (>= 2.0.2) mixlib-install (>= 1.0, < 3.0) net-scp (~> 1.0) net-ssh (>= 2.9, < 5.0) net-ssh-gateway (~> 1.2) + winrm (~> 2.0) winrm-fs (~> 1.0) chef-sugar (3.4.0) chef-zero (5.3.0) @@ -178,12 +246,12 @@ GEM rspec (~> 3.0) codeclimate-test-reporter (0.6.0) simplecov (>= 0.7.1, < 1.0.0) - codecov (0.1.9) + codecov (0.1.10) json simplecov url coderay (1.1.1) - concurrent-ruby (1.0.4) + concurrent-ruby (1.0.5) cucumber (2.4.0) builder (>= 2.1.2) cucumber-core (~> 1.5.0) @@ -198,7 +266,7 @@ GEM debug_inspector (0.0.2) diff-lcs (1.3) docile (1.1.5) - domain_name (0.5.20161129) + domain_name (0.5.20170223) unf (>= 0.0.5, < 1.0.0) erubis (2.7.0) ethon (0.10.1) @@ -243,17 +311,12 @@ GEM ffi (>= 1.0.1) gyoku (1.3.1) builder (>= 2.1.2) - halite (1.4.0) - bundler - chef (~> 12.0) - stove (~> 4.0) - thor - hashie (3.5.3) + hashie (3.5.5) highline (1.7.8) http-cookie (1.0.3) domain_name (~> 0.5) httpclient (2.8.3) - i18n (0.8.0) + i18n (0.8.1) inifile (3.0.0) iniparse (1.4.2) ipaddress (0.8.3) @@ -261,7 +324,7 @@ GEM json (2.0.3) kitchen-docker (2.6.0) test-kitchen (>= 1.0.0) - kitchen-ec2 (1.3.0) + kitchen-ec2 (1.3.2) aws-sdk (~> 2) excon multi_json @@ -270,7 +333,7 @@ GEM kitchen-sync (2.1.2) net-sftp test-kitchen (>= 1.0.0) - kitchen-vagrant (1.0.1) + kitchen-vagrant (1.0.2) test-kitchen (~> 1.4) knife-windows (1.9.0) winrm (~> 2.1) @@ -316,7 +379,7 @@ GEM net-ssh (>= 2.6.5) net-sftp (2.1.2) net-ssh (>= 2.6.5) - net-ssh (4.0.1) + net-ssh (4.1.0) net-ssh-gateway (1.3.0) net-ssh (>= 2.6.5) net-ssh-multi (1.2.1) @@ -331,51 +394,9 @@ GEM nori (2.6.0) octokit (4.6.2) sawyer (~> 0.8.0, >= 0.5.3) - ohai (8.23.0) - chef-config (>= 12.5.0.alpha.1, < 13) - ffi (~> 1.9) - ffi-yajl (~> 2.2) - ipaddress - mixlib-cli - mixlib-config (~> 2.0) - mixlib-log (>= 1.7.1, < 2.0) - mixlib-shellout (~> 2.0) - plist (~> 3.1) - systemu (~> 2.6.4) - wmi-lite (~> 1.0) parser (2.4.0.0) ast (~> 2.2) plist (3.2.0) - poise (2.7.2) - halite (~> 1.0) - poise-boiler (1.13.2) - bundler - chefspec (~> 5.0) - codeclimate-test-reporter (~> 0.4) - codecov (~> 0.0, >= 0.0.2) - foodcritic (>= 7, < 9) - fuubar (~> 2.0) - git (~> 1.2) - halite (~> 1.2) - kitchen-docker (>= 2.6.0.rc.0) - kitchen-ec2 (~> 1.0) - kitchen-sync (~> 2.1) - kitchen-vagrant - mixlib-shellout (>= 1.4, < 3.0) - poise-profiler (~> 1.0) - pry - pry-byebug - rake (>= 10.4, < 12.0) - rspec (~> 3.2) - rspec-its (~> 1.2) - simplecov (~> 0.9) - test-kitchen (~> 1.7, >= 1.7.1) - travis (~> 1.8, >= 1.8.1) - vagrant-wrapper - winrm (>= 1.6, < 3) - winrm-fs (>= 0.4, < 2) - yard (~> 0.8) - yard-classmethods (~> 1.0) poise-profiler (1.0.1) halite (~> 1.0) polyglot (0.3.5) @@ -401,16 +422,16 @@ GEM rainbow (2.2.1) rake (11.3.0) rb-readline (0.5.4) - rest-client (2.0.0) + rest-client (2.0.1) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rest-client (2.0.0-x86-mingw32) + rest-client (2.0.1-x86-mingw32) ffi (~> 1.9) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - retriable (3.0.0) + retriable (3.0.1) retryable (2.0.4) rspec (3.5.0) rspec-core (~> 3.5.0) @@ -461,7 +482,7 @@ GEM simplecov-html (~> 0.10.0) simplecov-html (0.10.0) slop (3.6.0) - specinfra (2.66.9) + specinfra (2.67.2) net-scp net-ssh (>= 2.7, < 5.0) net-telnet @@ -480,7 +501,7 @@ GEM safe_yaml (~> 1.0) thor (~> 0.18) thor (0.19.4) - thread_safe (0.3.5) + thread_safe (0.3.6) tomlrb (1.2.3) travis (1.8.6) backports @@ -567,15 +588,16 @@ DEPENDENCIES cucumber (>= 2.4.0) foodcritic github_changelog_generator! - halite + halite! knife-windows mixlib-install netrc nokogiri oc-chef-pedant! octokit - poise - poise-boiler + ohai! + poise! + poise-boiler! pry pry-byebug pry-remote @@ -590,4 +612,4 @@ DEPENDENCIES yard BUNDLED WITH - 1.12.5 + 1.13.7 diff --git a/HISTORY.md b/HISTORY.md index acce953a47..9c3fdb8771 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,35 @@ +## [v12.19.33](https://github.com/chef/chef/tree/v12.19.33) (2017-02-16) +[Full Changelog](https://github.com/chef/chef/compare/v12.18.31...v12.19.33) + +**Closed issues:** + +- Package resource fails chefspec on RHEL starting with Chef 12.18. [\#5769](https://github.com/chef/chef/issues/5769) + +**Merged pull requests:** + +- coerce immutable arrays to normal arrays in the yum\_package resource [\#5816](https://github.com/chef/chef/pull/5816) ([lamont-granquist](https://github.com/lamont-granquist)) +- Suppress sensitive properties from resource log and reporting output [\#5803](https://github.com/chef/chef/pull/5803) ([tduffield](https://github.com/tduffield)) +- Sanitize UTF-8 data sent to Data Collector [\#5793](https://github.com/chef/chef/pull/5793) ([lamont-granquist](https://github.com/lamont-granquist)) +- Add multipackage\_api support to yum\_package provider [\#5791](https://github.com/chef/chef/pull/5791) ([tduffield](https://github.com/tduffield)) +- rhel7 / dnf 2.0 fixes / improved errors [\#5782](https://github.com/chef/chef/pull/5782) ([lamont-granquist](https://github.com/lamont-granquist)) +- Grant Administrators group permissions to nodes directory under chef-solo [\#5781](https://github.com/chef/chef/pull/5781) ([tduffield](https://github.com/tduffield)) +- Fix --no-fips on chef-client [\#5778](https://github.com/chef/chef/pull/5778) ([btm](https://github.com/btm)) +- Raise error if ips\_package install returns non-zero [\#5773](https://github.com/chef/chef/pull/5773) ([tduffield](https://github.com/tduffield)) +- Use CIDR notation rather than netmask in route-eth0 file [\#5772](https://github.com/chef/chef/pull/5772) ([tduffield](https://github.com/tduffield)) +- Verify systemd\_unit file with custom verifier [\#5765](https://github.com/chef/chef/pull/5765) ([mal](https://github.com/mal)) +- Windows alternate user support for execute resources [\#5764](https://github.com/chef/chef/pull/5764) ([NimishaS](https://github.com/NimishaS)) +- favor metadata.json over metadata.rb [\#5750](https://github.com/chef/chef/pull/5750) ([lamont-granquist](https://github.com/lamont-granquist)) +- Ensure ssh search paginates correctly [\#5744](https://github.com/chef/chef/pull/5744) ([thommay](https://github.com/thommay)) +- Do not modify File's new\_resource during why-run [\#5742](https://github.com/chef/chef/pull/5742) ([scottopherson](https://github.com/scottopherson)) +- Add gems for ECC algorithm support to omnibus. [\#5736](https://github.com/chef/chef/pull/5736) ([rhass](https://github.com/rhass)) +- dh/url support cab [\#5732](https://github.com/chef/chef/pull/5732) ([dheerajd-msys](https://github.com/dheerajd-msys)) +- use git archive to speed up putting source in place [\#5730](https://github.com/chef/chef/pull/5730) ([robbkidd](https://github.com/robbkidd)) +- use pkg.path variable to reference path to self [\#5729](https://github.com/chef/chef/pull/5729) ([robbkidd](https://github.com/robbkidd)) +- Raise NamedSecurityInfo related exception using HR result. [\#5727](https://github.com/chef/chef/pull/5727) ([Aliasgar16](https://github.com/Aliasgar16)) +- Core: Ensure paths are correctly escaped when syntax checking [\#5704](https://github.com/chef/chef/pull/5704) ([ceneo](https://github.com/ceneo)) +- Added module\_version attribute for dsc\_resource for SxS support [\#5701](https://github.com/chef/chef/pull/5701) ([Aliasgar16](https://github.com/Aliasgar16)) +- Bump net-ssh to v4, add dependencies for ed25519 support [\#5687](https://github.com/chef/chef/pull/5687) ([onlyhavecans](https://github.com/onlyhavecans)) + ## [v12.18.31](https://github.com/chef/chef/tree/v12.18.31) (2017-01-11) [Full Changelog](https://github.com/chef/chef/compare/v12.17.44...v12.18.31) @@ -1327,5 +1359,4 @@ of partial templates. * Fixed a bug where nested resources that inherited from Resource::LWRPBase would not share the same actions/default_action as their parent * Raise error if a guard_interpreter is specified and a block is passed to a guard (conditional) -* Allow specifying a guard_interpreter after a conditional on a resource (Fixes #1943) -* Windows package type should be a symbol (Fixes #1997)
\ No newline at end of file +* Allow specifying a guard_interpreter after a conditional on a resource (Fixes #1943)
\ No newline at end of file diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7d990d9fe7..f58c2f0950 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,150 +1,51 @@ _This file holds "in progress" release notes for the current release under development and is intended for consumption by the Chef Documentation team. Please see <https://docs.chef.io/release_notes.html> for the official Chef release notes._ -# Chef Client Release Notes 12.19: +# Chef Client Release Notes 13.0: -## Highlighted enhancements for this release: +## Back Compat Breaks -- Systemd unit files are now verified before being installed. -- Added support for windows alternate user identity in execute resources. -- Added ed25519 key support for for ssh connections. +### The path property of the execute resource has been removed -### Windows alternate user identity execute support +It was never implemented in the provider, so it was always a no-op to use it, the remediation is +to simply delete it. -The `execute` resource and similar resources such as `script`, `batch`, and `powershell_script` now support the specification of credentials on Windows so that the resulting process is created with the security identity that corresponds to those credentials. +### Using the command property on any script resource (including bash, etc) is now a hard error -**Note**: When Chef is running as a service, this feature requires that the user that Chef runs as has 'SeAssignPrimaryTokenPrivilege' (aka 'SE_ASSIGNPRIMARYTOKEN_NAME') user right. By default only LocalSystem and NetworkService have this right when running as a service. This is necessary even if the user is an Administrator. +This was always a usage mistake. The command property was used internally by the script resource and was not intended to be exposed +to users. Users should use the code property instead (or use the command property on an execute resource to execute a single command). -This right bacn be added and checked in a recipe using this example: +### Omitting the code property on any script resource (including bash, etc) is now a hard error -```ruby -# Add 'SeAssignPrimaryTokenPrivilege' for the user -Chef::ReservedNames::Win32::Security.add_account_right('<user>', 'SeAssignPrimaryTokenPrivilege') +It is possible that this was being used as a no-op resource, but the log resource is a better choice for that until we get a null +resource added. Omitting the code property or mixing up the code property with the command property are also common usage mistakes +that we need to catch and error on. -# Check if the user has 'SeAssignPrimaryTokenPrivilege' rights -Chef::ReservedNames::Win32::Security.get_account_right('<user>').include?('SeAssignPrimaryTokenPrivilege') -``` +### The chef_gem resource defaults to not run at compile time -#### Properties +The `compile_time true` flag may still be used to force compile time. -The following properties are new or updated for the `execute`, `script`, `batch`, and `powershell_script` resources and any resources derived from them: +### The Chef::Config[:chef_gem_compile_time] config option has been removed -- `user`<br> - **Ruby types:** String<br> - The user name of the user identity with which to launch the new process. Default value: `nil`. The user name may optionally be specified with a domain, i.e. `domain\user` or `user@my.dns.domain.com` via Universal Principal Name (UPN) format. It can also be specified without a domain simply as `user` if the domain is instead specified using the `domain` attribute. On Windows only, if this property is specified, the `password` property **must** be specified. +In order to for community cookbooks to behave consistently across all users this optional flag has been removed. -- `password`<br> - **Ruby types** String<br> - _Windows only:_ The password of the user specified by the `user` property. Default value: `nil`. This property is mandatory if `user` is specified on Windows and may only be specified if `user` is specified. The `sensitive` property for this resource will automatically be set to `true` if `password` is specified. +### The `supports[:manage_home]` and `supports[:non_unique]` API has been removed from all user providers -- `domain`<br> - **Ruby types** String<br> - _Windows only:_ The domain of the user user specified by the `user` property. Default value: `nil`. If not specified, the user name and password specified by the `user` and `password` properties will be used to resolve that user against the domain in which the system running Chef client is joined, or if that system is not joined to a domain it will resolve the user as a local account on that system. An alternative way to specify the domain is to leave this property unspecified and specify the domain as part of the `user` property. +The remediation is to set the manage_home and non_unique properties directly. -#### Usage +### Using relative paths in the `creates` property of an execute resource with specifying a `cwd` is now a hard error -The following examples explain how alternate user identity properties can be used in the execute resources: +Without a declared cwd the relative path was (most likely?) relative to wherever chef-client happened to be invoked which is +not deterministic or easy to intuit behavior. -```ruby -powershell_script 'create powershell-test file' do - code <<-EOH - $stream = [System.IO.StreamWriter] "#{Chef::Config[:file_cache_path]}/powershell-test.txt" - $stream.WriteLine("In #{Chef::Config[:file_cache_path]}...word.") - $stream.close() - EOH - user 'username' - password 'password' -end +### Chef::PolicyBuilder::ExpandNodeObject#load_node has been removed -execute 'mkdir test_dir' do - cwd Chef::Config[:file_cache_path] - domain "domain-name" - user "user" - password "password" -end +This change is most likely to only affect internals of tooling like chefspec if it affects anything at all. -script 'create test_dir' do - interpreter "bash" - code "mkdir test_dir" - cwd Chef::Config[:file_cache_path] - user "domain-name\\username" - password "password" -end +### PolicyFile failback to create non-policyfile nodes on Chef Server < 12.3 has been removed -batch 'create test_dir' do - code "mkdir test_dir" - cwd Chef::Config[:file_cache_path] - user "username@domain-name" - password "password" -end -``` +PolicyFile users on Chef-13 should be using Chef Server 12.3 or higher. -## Highlighted bug fixes for this release: +### Cookbooks with self dependencies are no longer allowed -- Ensure that the Windows Administrator group can access the chef-solo nodes directory -- When loading a cookbook in Chef Solo, use `metadata.json` in preference to `metadata.rb` +The remediation is removing the self-dependency `depends` line in the metadata. -## Deprecation Notice - -- As of version 12.19, chef client will no longer be build or tested on the Cisco NX-OS and IOS XR platforms. - -# Ohai Release Notes 8.23: - -## Cumulus Linux Platform - -Cumulus Linux will now be detected as platform `cumulus` instead of `debian` and the `platform_version` will be properly set to the Cumulus Linux release. - -## Virtualization Detection - -Windows / Linux / BSD guests running on the Veertu hypervisors will now be detected - -Windows guests running on Xen and Hyper-V hypervisors will now be detected - -## New Sysconf Plugin - -A new plugin parses the output of the sysconf command to provide information on the underlying system. - -## AWS Account ID - -The EC2 plugin now fetches the AWS Account ID in addition to previous instance metadata - -## GCC Detection - -GCC detection has been improved to collect additional information, and to not prompt for the installation of Xcode on macOS systems - -## New deprecations introduced in this release: - -### Ohai::Config removed - -- **Deprecation ID**: OHAI-1 -- **Remediation Docs**: <https://docs.chef.io/deprecations_ohai_legacy_config.html> -- **Expected Removal**: Ohai 13 (April 2017) - -### sigar gem based plugins removed - -- **Deprecation ID**: OHAI-2 -- **Remediation Docs**: <https://docs.chef.io/deprecations_ohai_sigar_plugins.html> -- **Expected Removal**: Ohai 13 (April 2017) - -### run_command and popen4 helper methods removed - -- **Deprecation ID**: OHAI-3 -- **Remediation Docs**: <https://docs.chef.io/deprecations_ohai_run_command_helpers.html> -- **Expected Removal**: Ohai 13 (April 2017) - -### libvirt plugin attributes moved - -- **Deprecation ID**: OHAI-4 -- **Remediation Docs**: <https://docs.chef.io/deprecations_ohai_libvirt_plugin.html> -- **Expected Removal**: Ohai 13 (April 2017) - -### Windows CPU plugin attribute changes - -- **Deprecation ID**: OHAI-5 -- **Remediation Docs**: <https://docs.chef.io/deprecations_ohai_windows_cpu.html> -- **Expected Removal**: Ohai 13 (April 2017) - -### DigitalOcean plugin attribute changes - -- **Deprecation ID**: OHAI-6 -- **Remediation Docs**: <https://docs.chef.io/deprecations_ohai_digitalocean.html> -- **Expected Removal**: Ohai 13 (April 2017) @@ -1 +1 @@ -12.19.39
\ No newline at end of file +13.0.0
\ No newline at end of file diff --git a/acceptance/Gemfile.lock b/acceptance/Gemfile.lock index 8dfb2ec217..e025c3c35a 100644 --- a/acceptance/Gemfile.lock +++ b/acceptance/Gemfile.lock @@ -1,5 +1,5 @@ GIT - remote: git://github.com/chef/chef-acceptance.git + remote: https://github.com/chef/chef-acceptance.git revision: e92ddae46d2126864698b9c8e4fc4ec2dcc46c55 specs: chef-acceptance (0.2.0) @@ -11,16 +11,16 @@ GEM specs: addressable (2.5.0) public_suffix (~> 2.0, >= 2.0.2) - artifactory (2.6.0) - aws-sdk (2.7.5) - aws-sdk-resources (= 2.7.5) - aws-sdk-core (2.7.5) + artifactory (2.7.0) + aws-sdk (2.7.13) + aws-sdk-resources (= 2.7.13) + aws-sdk-core (2.7.13) aws-sigv4 (~> 1.0) jmespath (~> 1.0) - aws-sdk-resources (2.7.5) - aws-sdk-core (= 2.7.5) + aws-sdk-resources (2.7.13) + aws-sdk-core (= 2.7.13) aws-sigv4 (1.0.0) - berkshelf (5.6.2) + berkshelf (5.6.3) addressable (~> 2.3, >= 2.3.4) berkshelf-api-client (>= 2.0.2, < 4.0) buff-config (~> 2.0) @@ -54,7 +54,7 @@ GEM celluloid-io (0.16.2) celluloid (>= 0.16.0) nio4r (>= 1.1.0) - chef-config (12.18.31) + chef-config (13.0.0) addressable fuzzyurl mixlib-config (~> 2.0) @@ -75,7 +75,7 @@ GEM ffi (>= 1.0.1) gyoku (1.3.1) builder (>= 2.1.2) - hashie (3.5.1) + hashie (3.5.4) hitimes (1.2.4) httpclient (2.8.3) inspec (1.14.1) @@ -96,7 +96,7 @@ GEM train (>= 0.22.0, < 1.0) jmespath (1.3.1) json (2.0.3) - kitchen-ec2 (1.2.0) + kitchen-ec2 (1.3.1) aws-sdk (~> 2) excon multi_json @@ -106,7 +106,7 @@ GEM hashie (~> 3.4) inspec (>= 0.34.0, < 2.0.0) test-kitchen (~> 1.6) - kitchen-vagrant (1.0.0) + kitchen-vagrant (1.0.2) test-kitchen (~> 1.4) little-plugger (1.1.4) logging (2.1.0) @@ -131,7 +131,7 @@ GEM multipart-post (2.0.0) net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (4.0.1) + net-ssh (4.1.0) net-ssh-gateway (1.3.0) net-ssh (>= 2.6.5) nio4r (2.0.0) @@ -255,4 +255,4 @@ DEPENDENCIES winrm-elevated BUNDLED WITH - 1.12.5 + 1.13.7 diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb index 4f2516331d..00af16687a 100644 --- a/chef-config/lib/chef-config/config.rb +++ b/chef-config/lib/chef-config/config.rb @@ -4,7 +4,7 @@ # Author:: AJ Christensen (<aj@chef.io>) # Author:: Mark Mzyk (<mmzyk@chef.io>) # Author:: Kyle Goodwin (<kgoodwin@primerevenue.com>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -825,13 +825,6 @@ module ChefConfig # default :no_lazy_load, true - # Default for the chef_gem compile_time attribute. Nil is the same as true but will emit - # warnings on every use of chef_gem prompting the user to be explicit. If the user sets this to - # true then the user will get backcompat behavior but with a single nag warning that cookbooks - # may break with this setting in the future. The false setting is the recommended setting and - # will become the default. - default :chef_gem_compile_time, nil - # A whitelisted array of attributes you want sent over the wire when node # data is saved. # The default setting is nil, which collects all data. Setting to [] will not diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index c84ff4304e..2be1bfc1a7 100644 --- a/chef-config/lib/chef-config/version.rb +++ b/chef-config/lib/chef-config/version.rb @@ -21,7 +21,7 @@ module ChefConfig CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.19.39" + VERSION = "13.0.0" end # diff --git a/chef.gemspec b/chef.gemspec index 2b80d817b8..36387f91b0 100644 --- a/chef.gemspec +++ b/chef.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |s| s.add_dependency "mixlib-authentication", "~> 1.4" s.add_dependency "mixlib-shellout", "~> 2.0" s.add_dependency "mixlib-archive", "~> 0.4" - s.add_dependency "ohai", ">= 8.6.0.alpha.1", "< 13" + s.add_dependency "ohai", "~> 13.0" s.add_dependency "ffi-yajl", "~> 2.2" s.add_dependency "net-ssh", ">= 2.9", "< 5.0" diff --git a/kitchen-tests/.kitchen.travis.yml b/kitchen-tests/.kitchen.travis.yml index aae5202457..6a66daffe6 100644 --- a/kitchen-tests/.kitchen.travis.yml +++ b/kitchen-tests/.kitchen.travis.yml @@ -14,6 +14,7 @@ provisioner: github_owner: "chef" github_repo: "chef" refname: <%= ENV['TRAVIS_COMMIT'] %> + ohai_refname: "master" github_access_token: <%= ENV['KITCHEN_GITHUB_TOKEN'] %> data_path: test/fixtures # disable file provider diffs so we don't overflow travis' line limit diff --git a/kitchen-tests/.kitchen.yml b/kitchen-tests/.kitchen.yml index d6df77932a..33841b0b94 100644 --- a/kitchen-tests/.kitchen.yml +++ b/kitchen-tests/.kitchen.yml @@ -15,6 +15,7 @@ provisioner: chef_omnibus_install_options: "-c current" github_owner: "chef" github_repo: "chef" + ohai_refname: "master" refname: <%= %x(git rev-parse HEAD) %> data_path: test/fixtures client_rb: diff --git a/kitchen-tests/Berksfile.lock b/kitchen-tests/Berksfile.lock index 6d8f40436a..4643665745 100644 --- a/kitchen-tests/Berksfile.lock +++ b/kitchen-tests/Berksfile.lock @@ -52,8 +52,7 @@ GRAPH sudo (>= 0.0.0) ubuntu (>= 0.0.0) users (>= 0.0.0) - build-essential (7.0.3) - compat_resource (>= 12.16.3) + build-essential (8.0.0) mingw (>= 1.1) seven_zip (>= 0.0.0) chef-client (7.1.0) @@ -67,10 +66,10 @@ GRAPH cron (3.0.0) database (6.1.1) postgresql (>= 1.0.0) - firewall (2.5.3) + firewall (2.5.4) chef-sugar (>= 0.0.0) - httpd (0.4.4) - compat_resource (>= 12.14.6) + httpd (0.4.5) + compat_resource (>= 12.16.3) iis (5.0.5) windows (>= 1.34.6) iptables (3.1.0) @@ -96,8 +95,7 @@ GRAPH nscd (4.1.0) compat_resource (>= 0.0.0) ntp (3.3.1) - ohai (4.2.3) - compat_resource (>= 12.14.7) + ohai (5.0.0) openssh (2.1.1) iptables (>= 1.0) openssl (6.1.1) @@ -127,7 +125,7 @@ GRAPH ohai (>= 4.0.0) xml (3.1.1) build-essential (>= 0.0.0) - yum (4.1.0) + yum (5.0.0) yum-epel (2.1.1) compat_resource (>= 12.16.3) yum-mysql-community (2.0.3) diff --git a/kitchen-tests/Gemfile.lock b/kitchen-tests/Gemfile.lock index b9d14397f1..81ab901afa 100644 --- a/kitchen-tests/Gemfile.lock +++ b/kitchen-tests/Gemfile.lock @@ -3,16 +3,16 @@ GEM specs: addressable (2.5.0) public_suffix (~> 2.0, >= 2.0.2) - artifactory (2.6.0) - aws-sdk (2.7.5) - aws-sdk-resources (= 2.7.5) - aws-sdk-core (2.7.5) + artifactory (2.7.0) + aws-sdk (2.7.15) + aws-sdk-resources (= 2.7.15) + aws-sdk-core (2.7.15) aws-sigv4 (~> 1.0) jmespath (~> 1.0) - aws-sdk-resources (2.7.5) - aws-sdk-core (= 2.7.5) + aws-sdk-resources (2.7.15) + aws-sdk-core (= 2.7.15) aws-sigv4 (1.0.0) - berkshelf (5.6.2) + berkshelf (5.6.3) addressable (~> 2.3, >= 2.3.4) berkshelf-api-client (>= 2.0.2, < 4.0) buff-config (~> 2.0) @@ -46,7 +46,7 @@ GEM celluloid-io (0.16.2) celluloid (>= 0.16.0) nio4r (>= 1.1.0) - chef-config (12.18.31) + chef-config (12.19.36) addressable fuzzyurl mixlib-config (~> 2.0) @@ -68,7 +68,7 @@ GEM ffi (>= 1.0.1) gyoku (1.3.1) builder (>= 2.1.2) - hashie (3.5.1) + hashie (3.5.5) hitimes (1.2.4) hitimes (1.2.4-x86-mingw32) httpclient (2.8.3) @@ -90,11 +90,11 @@ GEM train (>= 0.22.0, < 1.0) jmespath (1.3.1) json (2.0.3) - kitchen-appbundle-updater (0.1.2) + kitchen-appbundle-updater (0.2.0) kitchen-dokken (1.1.0) docker-api (~> 1.33) test-kitchen (~> 1.13) - kitchen-ec2 (1.2.0) + kitchen-ec2 (1.3.2) aws-sdk (~> 2) excon multi_json @@ -104,7 +104,7 @@ GEM hashie (~> 3.4) inspec (>= 0.34.0, < 2.0.0) test-kitchen (~> 1.6) - kitchen-vagrant (1.0.0) + kitchen-vagrant (1.0.2) test-kitchen (~> 1.4) little-plugger (1.1.4) logging (2.1.0) @@ -133,7 +133,7 @@ GEM multipart-post (2.0.0) net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (4.0.1) + net-ssh (4.1.0) net-ssh-gateway (1.3.0) net-ssh (>= 2.6.5) nio4r (2.0.0) @@ -256,4 +256,4 @@ DEPENDENCIES vagrant-wrapper BUNDLED WITH - 1.12.5 + 1.13.7 diff --git a/lib/chef/application.rb b/lib/chef/application.rb index ab19e6571e..86078300c2 100644 --- a/lib/chef/application.rb +++ b/lib/chef/application.rb @@ -1,7 +1,7 @@ # # Author:: AJ Christensen (<aj@chef.io>) # Author:: Mark Mzyk (mmzyk@chef.io) -# Copyright:: Copyright 2008-2016, Chef Software, Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -48,7 +48,6 @@ class Chef configure_chef configure_logging configure_encoding - emit_warnings end # Get this party started @@ -332,12 +331,6 @@ class Chef ENV end - def emit_warnings - if Chef::Config[:chef_gem_compile_time] - Chef.deprecated :chef_gem_compile_time, "setting chef_gem_compile_time to true is deprecated" - end - end - class << self def debug_stacktrace(e) message = "#{e.class}: #{e}\n#{e.backtrace.join("\n")}" diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb index 3f23bc2056..a8ec901e97 100644 --- a/lib/chef/cookbook/metadata.rb +++ b/lib/chef/cookbook/metadata.rb @@ -2,7 +2,7 @@ # Author:: Adam Jacob (<adam@chef.io>) # Author:: AJ Christensen (<aj@chef.io>) # Author:: Seth Falcon (<seth@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software, Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -306,7 +306,7 @@ class Chef # versions<Array>:: Returns the list of versions for the platform def depends(cookbook, *version_args) if cookbook == name - Chef::Log.warn "Ignoring self-dependency in cookbook #{name}, please remove it (in the future this will be fatal)." + raise "Cookbook depends on itself in cookbook #{name}, please remove the this unnecessary self-dependency" else version = new_args_format(:depends, cookbook, version_args) constraint = validate_version_constraint(:depends, cookbook, version) diff --git a/lib/chef/deprecated.rb b/lib/chef/deprecated.rb index e5026d2317..25eea5b5ec 100644 --- a/lib/chef/deprecated.rb +++ b/lib/chef/deprecated.rb @@ -1,5 +1,5 @@ #-- -# Copyright:: Copyright 2016 Chef Software, Inc. +# Copyright:: Copyright 2016-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -86,15 +86,7 @@ class Chef end end - class ChefGemCompileTime < Base - def id - 3 - end - - def target - "chef_gem_compile_time.html" - end - end + # id 3 has been deleted class Attributes < Base def id diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index ae62f42b09..78bdf0cf4a 100644 --- a/lib/chef/exceptions.rb +++ b/lib/chef/exceptions.rb @@ -2,7 +2,7 @@ # Author:: Adam Jacob (<adam@chef.io>) # Author:: Seth Falcon (<seth@chef.io>) # Author:: Kyle Goodwin (<kgoodwin@primerevenue.com>) -# Copyright:: Copyright 2008-2016, Chef Software, Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -47,6 +47,7 @@ class Chef class Cron < RuntimeError; end class Env < RuntimeError; end class Exec < RuntimeError; end + class Execute < RuntimeError; end class ErlCall < RuntimeError; end class FileNotFound < RuntimeError; end class Package < RuntimeError; end diff --git a/lib/chef/node.rb b/lib/chef/node.rb index 808fb1dc6e..66527a2a37 100644 --- a/lib/chef/node.rb +++ b/lib/chef/node.rb @@ -2,7 +2,7 @@ # Author:: Christopher Brown (<cb@chef.io>) # Author:: Christopher Walters (<cw@chef.io>) # Author:: Tim Hinderliter (<tim@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software, Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -599,11 +599,6 @@ class Chef rescue Net::HTTPServerException => e if e.response.code == "404" chef_server_rest.post("nodes", data_for_save) - # Chef Server before 12.3 rejects node JSON with 'policy_name' or - # 'policy_group' keys, but 'policy_name' will be detected first. - # Backcompat can be removed in 13.0 - elsif e.response.code == "400" && e.response.body.include?("Invalid key policy_name") - save_without_policyfile_attrs else raise end diff --git a/lib/chef/policy_builder/expand_node_object.rb b/lib/chef/policy_builder/expand_node_object.rb index d8f4f752de..dbed44a002 100644 --- a/lib/chef/policy_builder/expand_node_object.rb +++ b/lib/chef/policy_builder/expand_node_object.rb @@ -3,7 +3,7 @@ # Author:: Tim Hinderliter (<tim@chef.io>) # Author:: Christopher Walters (<cw@chef.io>) # Author:: Daniel DeLeo (<dan@chef.io>) -# Copyright:: Copyright 2008-2016 Chef Software, Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -103,33 +103,6 @@ class Chef run_context end - # DEPRECATED: As of Chef 12.5, chef selects either policyfile mode or - # "expand node" mode dynamically, based on the content of the node - # object, first boot JSON, and config. This happens in - # PolicyBuilder::Dynamic, which selects the implementation during - # #load_node and then delegates to either ExpandNodeObject or Policyfile - # implementations as appropriate. Tools authors should update their code - # to create a PolicyBuilder::Dynamc policy builder and allow it to select - # the proper implementation. - def load_node - Chef.deprecated(:internal_api, "ExpandNodeObject#load_node is deprecated. Please use Chef::PolicyBuilder::Dynamic instead of using ExpandNodeObject directly") - - events.node_load_start(node_name, config) - Chef::Log.debug("Building node object for #{node_name}") - - @node = - if Chef::Config[:solo_legacy_mode] - Chef::Node.build(node_name) - else - Chef::Node.find_or_create(node_name) - end - finish_load_node(node) - node - rescue Exception => e - events.node_load_failed(node_name, e, config) - raise - end - def finish_load_node(node) @node = node end diff --git a/lib/chef/provider/execute.rb b/lib/chef/provider/execute.rb index 28dce5d18c..81bfd25158 100644 --- a/lib/chef/provider/execute.rb +++ b/lib/chef/provider/execute.rb @@ -1,6 +1,6 @@ # # Author:: Adam Jacob (<adam@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -39,9 +39,9 @@ class Chef end def define_resource_requirements - # @todo: this should change to raise in some appropriate major version bump. if creates && creates_relative? && !cwd - Chef::Log.warn "Providing a relative path for the creates attribute without the cwd is deprecated and will be changed to fail in the future (CHEF-3819)" + # FIXME? move this onto the resource? + raise Chef::Exceptions::Execute, "Please either specify a full path for the creates attribute, or specify a cwd propoerty to the #{new_resource} resource" end end diff --git a/lib/chef/provider/user.rb b/lib/chef/provider/user.rb index c44adbf818..43102e7dec 100644 --- a/lib/chef/provider/user.rb +++ b/lib/chef/provider/user.rb @@ -1,6 +1,6 @@ # # Author:: Adam Jacob (<adam@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -205,16 +205,6 @@ class Chef def check_lock raise NotImplementedError end - - def non_unique? - # XXX: THIS GOES AWAY IN CHEF-13 AND BECOMES JUST new_resource.non_unique - new_resource.non_unique || new_resource.supports[:non_unique] - end - - def managing_home_dir? - # XXX: THIS GOES AWAY IN CHEF-13 AND BECOMES JUST new_resource.manage_home - new_resource.manage_home || new_resource.supports[:manage_home] - end end end end diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb index 2302a874e2..60167856d1 100644 --- a/lib/chef/provider/user/dscl.rb +++ b/lib/chef/provider/user/dscl.rb @@ -1,6 +1,6 @@ # # Author:: Dreamcat4 (<dreamcat4@gmail.com>) -# Copyright:: Copyright 2009-2016, Chef Software Inc. +# Copyright:: Copyright 2009-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -297,7 +297,7 @@ user password using shadow hash.") return end - if managing_home_dir? + if new_resource.manage_home validate_home_dir_specification! if (current_resource.home == new_resource.home) && !new_home_exists? @@ -442,7 +442,7 @@ user password using shadow hash.") # and deleting home directory if needed. # def remove_user - if managing_home_dir? + if new_resource.manage_home # Remove home directory FileUtils.rm_rf(current_resource.home) end diff --git a/lib/chef/provider/user/linux.rb b/lib/chef/provider/user/linux.rb index 445421ad38..cf75bdc38b 100644 --- a/lib/chef/provider/user/linux.rb +++ b/lib/chef/provider/user/linux.rb @@ -1,5 +1,5 @@ # -# Copyright:: Copyright 2016, Chef Software Inc. +# Copyright:: Copyright 2016-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -52,14 +52,14 @@ class Chef opts << "-s" << new_resource.shell if should_set?(:shell) opts << "-u" << new_resource.uid if should_set?(:uid) opts << "-d" << new_resource.home if updating_home? - opts << "-o" if non_unique? + opts << "-o" if new_resource.non_unique opts end def usermod_options opts = [] if updating_home? - if managing_home_dir? + if new_resource.manage_home opts << "-m" end end @@ -69,7 +69,7 @@ class Chef def useradd_options opts = [] opts << "-r" if new_resource.system - opts << if managing_home_dir? + opts << if new_resource.manage_home "-m" else "-M" @@ -79,7 +79,7 @@ class Chef def userdel_options opts = [] - opts << "-r" if managing_home_dir? + opts << "-r" if new_resource.manage_home opts << "-f" if new_resource.force opts end diff --git a/lib/chef/provider/user/pw.rb b/lib/chef/provider/user/pw.rb index 42d862a983..cf47bb7fde 100644 --- a/lib/chef/provider/user/pw.rb +++ b/lib/chef/provider/user/pw.rb @@ -1,6 +1,6 @@ # # Author:: Stephen Haynes (<sh@nomitor.com>) -# Copyright:: Copyright 2009-2016, Chef Software Inc. +# Copyright:: Copyright 2009-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -42,7 +42,7 @@ class Chef def remove_user command = [ "pw", "userdel", new_resource.username ] - command << "-r" if managing_home_dir? + command << "-r" if new_resource.manage_home shell_out_compact!(command) end @@ -83,7 +83,7 @@ class Chef opts << new_resource.send(field_symbol) end end - if managing_home_dir? + if new_resource.manage_home Chef::Log.debug("#{new_resource} is managing the users home directory") opts << "-m" end diff --git a/lib/chef/provider/user/solaris.rb b/lib/chef/provider/user/solaris.rb index 4e772312ae..25ec13fe5c 100644 --- a/lib/chef/provider/user/solaris.rb +++ b/lib/chef/provider/user/solaris.rb @@ -2,7 +2,7 @@ # Author:: Stephen Nelson-Smith (<sns@chef.io>) # Author:: Jon Ramsey (<jonathon.ramsey@gmail.com>) # Author:: Dave Eddy (<dave@daveeddy.com>) -# Copyright:: Copyright 2012-2016, Chef Software Inc. +# Copyright:: Copyright 2012-2017, Chef Software Inc. # Copyright:: Copyright 2015-2016, Dave Eddy # License:: Apache License, Version 2.0 # @@ -77,7 +77,7 @@ class Chef # @return [Array<String>] def useradd_options opts = [] - opts << "-m" if managing_home_dir? + opts << "-m" if new_resource.manage_home opts end diff --git a/lib/chef/provider/user/useradd.rb b/lib/chef/provider/user/useradd.rb index cf6f4e727f..0a32126903 100644 --- a/lib/chef/provider/user/useradd.rb +++ b/lib/chef/provider/user/useradd.rb @@ -1,6 +1,6 @@ # # Author:: Adam Jacob (<adam@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -46,7 +46,7 @@ class Chef def remove_user command = [ "userdel" ] - command << "-r" if managing_home_dir? + command << "-r" if new_resource.manage_home command << "-f" if new_resource.force command << new_resource.username shell_out_compact!(command) @@ -117,14 +117,14 @@ class Chef end if updating_home? opts << "-d" << new_resource.home - if managing_home_dir? + if new_resource.manage_home Chef::Log.debug("#{new_resource} managing the users home directory") opts << "-m" else Chef::Log.debug("#{new_resource} setting home to #{new_resource.home}") end end - opts << "-o" if non_unique? + opts << "-o" if new_resource.non_unique opts end end @@ -139,7 +139,7 @@ class Chef def useradd_options opts = [] opts << "-r" if new_resource.system - opts << "-M" unless managing_home_dir? + opts << "-M" unless new_resource.manage_home opts end diff --git a/lib/chef/resource/chef_gem.rb b/lib/chef/resource/chef_gem.rb index 5f51c9e208..7025d74e58 100644 --- a/lib/chef/resource/chef_gem.rb +++ b/lib/chef/resource/chef_gem.rb @@ -1,6 +1,6 @@ # # Author:: Bryan McLellan <btm@loftninjas.org> -# Copyright:: Copyright 2012-2016, Chef Software Inc. +# Copyright:: Copyright 2012-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -28,17 +28,10 @@ class Chef callbacks: { "The chef_gem resource is restricted to the current gem environment, use gem_package to install to other environments." => proc { |v| v == "#{RbConfig::CONFIG['bindir']}/gem" }, } - property :compile_time, [ true, false, nil ], default: lazy { Chef::Config[:chef_gem_compile_time] }, desired_state: false + property :compile_time, [ true, false ], default: false, desired_state: false def after_created - # Chef::Resource.run_action: Caveat: this skips Chef::Runner.run_action, where notifications are handled - # Action could be an array of symbols, but probably won't (think install + enable for a package) - if compile_time.nil? - message = "#{self} chef_gem compile_time installation is deprecated. Please set `compile_time false` on the resource to use the new behavior, or set `compile_time true` on the resource if compile_time behavior is required." - Chef.deprecated :chef_gem_compile_time, message - end - - if compile_time || compile_time.nil? + if compile_time Array(action).each do |action| run_action(action) end diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb index 677c4608b3..c327b00fb6 100644 --- a/lib/chef/resource/execute.rb +++ b/lib/chef/resource/execute.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Tyler Cloke (<tyler@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -109,16 +109,6 @@ class Chef :kind_of => [ TrueClass, FalseClass ]) end - def path(arg = nil) - Chef::Log.warn "The 'path' attribute of 'execute' is not used by any provider in Chef 11 or Chef 12. Use 'environment' attribute to configure 'PATH'. This attribute will be removed in Chef 13." - - set_or_return( - :path, - arg, - :kind_of => [ Array ] - ) - end - def returns(arg = nil) set_or_return( :returns, diff --git a/lib/chef/resource/script.rb b/lib/chef/resource/script.rb index 5173a76542..5039e2d8fe 100644 --- a/lib/chef/resource/script.rb +++ b/lib/chef/resource/script.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Tyler Cloke (<tyler@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,51 +23,25 @@ require "chef/provider/script" class Chef class Resource class Script < Chef::Resource::Execute - # Chef-13: go back to using :name as the identity attr - identity_attr :command + identity_attr :name def initialize(name, run_context = nil) super - # Chef-13: the command variable should be initialized to nil - @command = name - @code = nil - @interpreter = nil - @flags = nil + @command = nil @default_guard_interpreter = :default end + # FIXME: remove this and use an execute sub-resource instead of inheriting from Execute def command(arg = nil) unless arg.nil? - # Chef-13: change this to raise if the user is trying to set a value here - Chef::Log.warn "Specifying command attribute on a script resource is a coding error, use the 'code' attribute, or the execute resource" - Chef::Log.warn "This attribute is deprecated and must be fixed or this code will fail on Chef 13" + raise Chef::Exceptions::Script, "Do not use the command attribute on a #{resource_name} resource, use the 'code' attribute instead." end super end - def code(arg = nil) - set_or_return( - :code, - arg, - :kind_of => [ String ] - ) - end - - def interpreter(arg = nil) - set_or_return( - :interpreter, - arg, - :kind_of => [ String ] - ) - end - - def flags(arg = nil) - set_or_return( - :flags, - arg, - :kind_of => [ String ] - ) - end + property :code, String, required: true + property :interpreter, String + property :flags, String end end diff --git a/lib/chef/resource/user.rb b/lib/chef/resource/user.rb index fc7720bc25..288335a599 100644 --- a/lib/chef/resource/user.rb +++ b/lib/chef/resource/user.rb @@ -1,6 +1,6 @@ # # Author:: Adam Jacob (<adam@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -42,10 +42,6 @@ class Chef @manage_home = false @force = false @non_unique = false - @supports = { - manage_home: false, - non_unique: false, - } @iterations = 27855 @salt = nil end @@ -157,17 +153,7 @@ class Chef end def supports(args = {}) - if args.key?(:manage_home) - Chef.deprecated(:supports_property, "supports { manage_home: #{args[:manage_home]} } on the user resource is deprecated and will be removed in Chef 13, set manage_home #{args[:manage_home]} instead") - end - if args.key?(:non_unique) - Chef.deprecated(:supports_property, "supports { non_unique: #{args[:non_unique]} } on the user resource is deprecated and will be removed in Chef 13, set non_unique #{args[:non_unique]} instead") - end - super - end - - def supports=(args) - supports(args) + raise Chef::Exceptions::User, "calling supports on a user resource is no longer supported in Chef-13, you probably need to use the manage_home or non_unique properties directly" end end end diff --git a/lib/chef/resource/user/aix_user.rb b/lib/chef/resource/user/aix_user.rb index 7c07db2e25..d5f1829b63 100644 --- a/lib/chef/resource/user/aix_user.rb +++ b/lib/chef/resource/user/aix_user.rb @@ -1,5 +1,5 @@ # -# Copyright:: Copyright 2016, Chef Software Inc. +# Copyright:: Copyright 2016-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/chef/resource/user/dscl_user.rb b/lib/chef/resource/user/dscl_user.rb index 61517d8b44..6eb1c953f4 100644 --- a/lib/chef/resource/user/dscl_user.rb +++ b/lib/chef/resource/user/dscl_user.rb @@ -1,5 +1,5 @@ # -# Copyright:: Copyright 2016, Chef Software Inc. +# Copyright:: Copyright 2016-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/chef/resource/user/linux_user.rb b/lib/chef/resource/user/linux_user.rb index ec60ac89bf..056a421197 100644 --- a/lib/chef/resource/user/linux_user.rb +++ b/lib/chef/resource/user/linux_user.rb @@ -1,5 +1,5 @@ # -# Copyright:: Copyright 2016, Chef Software Inc. +# Copyright:: Copyright 2016-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,15 +26,6 @@ class Chef provides :linux_user provides :user, os: "linux" - def initialize(name, run_context = nil) - super - @supports = { - manage_home: false, - non_unique: false, - } - @manage_home = false - end - end end end diff --git a/lib/chef/resource/user/pw_user.rb b/lib/chef/resource/user/pw_user.rb index 873be19d59..3672943f5c 100644 --- a/lib/chef/resource/user/pw_user.rb +++ b/lib/chef/resource/user/pw_user.rb @@ -1,5 +1,5 @@ # -# Copyright:: Copyright 2016, Chef Software Inc. +# Copyright:: Copyright 2016-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/chef/resource/user/solaris_user.rb b/lib/chef/resource/user/solaris_user.rb index bb897228b9..cca90e6743 100644 --- a/lib/chef/resource/user/solaris_user.rb +++ b/lib/chef/resource/user/solaris_user.rb @@ -1,5 +1,5 @@ # -# Copyright:: Copyright 2016, Chef Software Inc. +# Copyright:: Copyright 2016-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/chef/resource/user/windows_user.rb b/lib/chef/resource/user/windows_user.rb index d1a249fb50..baedc14f5e 100644 --- a/lib/chef/resource/user/windows_user.rb +++ b/lib/chef/resource/user/windows_user.rb @@ -1,5 +1,5 @@ # -# Copyright:: Copyright 2016, Chef Software Inc. +# Copyright:: Copyright 2016-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/chef/run_list/versioned_recipe_list.rb b/lib/chef/run_list/versioned_recipe_list.rb index ccd7351eeb..ad769ee952 100644 --- a/lib/chef/run_list/versioned_recipe_list.rb +++ b/lib/chef/run_list/versioned_recipe_list.rb @@ -1,7 +1,7 @@ # # Author:: Stephen Delano (<stephen@chef.io>) # Author:: Seth Falcon (<seth@chef.io>) -# Copyright:: Copyright 2010-2016, Chef Software, Inc. +# Copyright:: Copyright 2010-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -83,17 +83,19 @@ class Chef end end - # Get an array of strings of both fully-qualified and unexpanded recipe names - # in response to chef/chef#3767 - # Chef-13 will revert to the behaviour of just including the fully-qualified name + # For "foo::default" also include "foo", for "foo" also include "foo::default", for + # "foo::bar" just return "foo::bar". This makes it easier for people to search on + # default recipe names. # # @return [Array] Array of strings with fully-qualified and unexpanded recipe names def with_duplicate_names map do |recipe_name| - if recipe_name.include?("::") + if recipe_name.end_with?("::default") + [ recipe_name.sub(/::default$/, ""), recipe_name ] + elsif recipe_name.include?("::") recipe_name else - [recipe_name, "#{recipe_name}::default"] + [ recipe_name, "#{recipe_name}::default" ] end end.flatten end diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 82afd17006..70a127e637 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -21,7 +21,7 @@ class Chef CHEF_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.19.39" + VERSION = "13.0.0" end # diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index ceb322bf20..85995a5b47 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -1,13 +1,13 @@ GIT - remote: git://github.com/chef/license_scout.git - revision: f90293a9753652fb64994a14de4108e503c06632 + remote: https://github.com/chef/license_scout.git + revision: 425b6f098224ddd9187d6a5bea73ebe6dffcb22a specs: license_scout (0.1.2) ffi-yajl (~> 2.2) mixlib-shellout (~> 2.2) GIT - remote: git://github.com/chef/omnibus-software.git + remote: https://github.com/chef/omnibus-software.git revision: 086710002ec0054b3d240d14ca04d11163f528aa branch: shain/ruby_windows_monster specs: @@ -16,7 +16,7 @@ GIT omnibus (>= 5.5.0) GIT - remote: git://github.com/chef/omnibus.git + remote: https://github.com/chef/omnibus.git revision: dce5283a85a44484a66a8a84991beba92e46fd12 branch: rhass/COOL-502_with_gcc_investigate specs: @@ -37,15 +37,15 @@ GEM specs: addressable (2.5.0) public_suffix (~> 2.0, >= 2.0.2) - artifactory (2.6.0) + artifactory (2.7.0) awesome_print (1.7.0) - aws-sdk (2.7.5) - aws-sdk-resources (= 2.7.5) - aws-sdk-core (2.7.5) + aws-sdk (2.7.13) + aws-sdk-resources (= 2.7.13) + aws-sdk-core (2.7.13) aws-sigv4 (~> 1.0) jmespath (~> 1.0) - aws-sdk-resources (2.7.5) - aws-sdk-core (= 2.7.5) + aws-sdk-resources (2.7.13) + aws-sdk-core (= 2.7.13) aws-sigv4 (1.0.0) berkshelf (4.3.5) addressable (~> 2.3, >= 2.3.4) @@ -86,7 +86,7 @@ GEM celluloid-io (0.16.2) celluloid (>= 0.16.0) nio4r (>= 1.1.0) - chef-config (12.18.31) + chef-config (12.19.33) addressable fuzzyurl mixlib-config (~> 2.0) @@ -107,7 +107,7 @@ GEM ffi (>= 1.0.1) gyoku (1.3.1) builder (>= 2.1.2) - hashie (3.5.1) + hashie (3.5.4) hitimes (1.2.4) hitimes (1.2.4-x86-mingw32) httpclient (2.7.2) @@ -146,7 +146,7 @@ GEM multipart-post (2.0.0) net-scp (1.2.1) net-ssh (>= 2.6.5) - net-ssh (4.0.1) + net-ssh (4.1.0) net-ssh-gateway (1.3.0) net-ssh (>= 2.6.5) nio4r (2.0.0) @@ -267,4 +267,4 @@ DEPENDENCIES winrm-fs (~> 1.0) BUNDLED WITH - 1.12.5 + 1.13.7 diff --git a/spec/data/shef-config.rb b/spec/data/shef-config.rb index 3c3ae9045a..02d3610e55 100644 --- a/spec/data/shef-config.rb +++ b/spec/data/shef-config.rb @@ -1,10 +1,9 @@ -Ohai::Config[:disabled_plugins] << 'darwin::system_profiler' << 'darwin::kernel' << 'darwin::ssh_host_key' << 'network_listeners' -Ohai::Config[:disabled_plugins] << "virtualization" << "darwin::virtualization" -Ohai::Config[:disabled_plugins] << 'darwin::uptime' << 'darwin::filesystem' << 'dmi' << 'lanuages' << 'perl' << 'python' << 'java' -Ohai::Config[:disabled_plugins] << "linux::block_device" << "linux::kernel" << "linux::ssh_host_key" << "linux::virtualization" -Ohai::Config[:disabled_plugins] << "linux::cpu" << "linux::memory" << "ec2" << "rackspace" << "eucalyptus" << "ip_scopes" -Ohai::Config[:disabled_plugins] << "solaris2::cpu" << "solaris2::dmi" << "solaris2::filesystem" << "solaris2::kernel" -Ohai::Config[:disabled_plugins] << "solaris2::virtualization" << "solaris2::zpools" -Ohai::Config[:disabled_plugins] << 'c' << 'php' << 'mono' << 'groovy' << 'lua' << 'erlang' -Ohai::Config[:disabled_plugins] << "kernel" << "linux::filesystem" << "ruby" - +ohai[:disabled_plugins] << "darwin::system_profiler" << "darwin::kernel" << "darwin::ssh_host_key" << "network_listeners" +ohai[:disabled_plugins] << "virtualization" << "darwin::virtualization" +ohai[:disabled_plugins] << "darwin::uptime" << "darwin::filesystem" << "dmi" << "lanuages" << "perl" << "python" << "java" +ohai[:disabled_plugins] << "linux::block_device" << "linux::kernel" << "linux::ssh_host_key" << "linux::virtualization" +ohai[:disabled_plugins] << "linux::cpu" << "linux::memory" << "ec2" << "rackspace" << "eucalyptus" << "ip_scopes" +ohai[:disabled_plugins] << "solaris2::cpu" << "solaris2::dmi" << "solaris2::filesystem" << "solaris2::kernel" +ohai[:disabled_plugins] << "solaris2::virtualization" << "solaris2::zpools" +ohai[:disabled_plugins] << "c" << "php" << "mono" << "groovy" << "lua" << "erlang" +ohai[:disabled_plugins] << "kernel" << "linux::filesystem" << "ruby" diff --git a/spec/functional/resource/bash_spec.rb b/spec/functional/resource/bash_spec.rb index a2e174d557..4a5fee64bc 100644 --- a/spec/functional/resource/bash_spec.rb +++ b/spec/functional/resource/bash_spec.rb @@ -1,6 +1,6 @@ # # Author:: Serdar Sutay (<serdar@chef.io>) -# Copyright:: Copyright 2014-2016, Chef Software Inc. +# Copyright:: Copyright 2014-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,59 +23,25 @@ describe Chef::Resource::Bash, :unix_only do let(:code) { "echo hello" } let(:resource) do resource = Chef::Resource::Bash.new("foo_resource", run_context) - resource.code(code) + resource.code(code) unless code.nil? resource end describe "when setting the command attribute" do let (:command) { "wizard racket" } - # in Chef-12 the `command` attribute is largely useless, but does set the identity attribute - # so that notifications need to target the value of the command. it will not run the `command` - # and if it is given without a code block then it does nothing and always succeeds. - describe "in Chef-12", chef: "< 13" do - it "gets the commmand attribute from the name" do - expect(resource.command).to eql("foo_resource") - end - - it "sets the resource identity to the command name" do - resource.command command - expect(resource.identity).to eql(command) - end - - it "warns when the code is not present and a useless `command` is present" do - expect(Chef::Log).to receive(:warn).with(/coding error/) - expect(Chef::Log).to receive(:warn).with(/deprecated/) - resource.code nil - resource.command command - expect { resource.run_action(:run) }.not_to raise_error - end - - describe "when the code is not present" do - let(:code) { nil } - it "warns" do - expect(Chef::Log).to receive(:warn) - expect { resource.run_action(:run) }.not_to raise_error - end - end + it "should raise an exception when trying to set the command" do + expect { resource.command command }.to raise_error(Chef::Exceptions::Script) end - # in Chef-13 the `command` attribute needs to be for internal use only - describe "in Chef-13", chef: ">= 13" do - it "should raise an exception when trying to set the command" do - expect { resource.command command }.to raise_error # FIXME: add a real error in Chef-13 - end - - it "should initialize the command to nil" do - expect(resource.command).to be_nil - end + it "should initialize the command to nil" do + expect(resource.command).to be_nil + end - describe "when the code is not present" do - let(:code) { nil } - it "raises an exception" do - expect { resource.run_action(:run) }.to raise_error # FIXME: add a real error in Chef-13 - expect { resource.run_action(:run) }.not_to raise_error - end + describe "when the code is not present" do + let(:code) { nil } + it "raises an exception" do + expect { resource.run_action(:run) }.to raise_error(Chef::Exceptions::ValidationFailed) end end end diff --git a/spec/integration/knife/deps_spec.rb b/spec/integration/knife/deps_spec.rb index 292bce6002..40ec411780 100644 --- a/spec/integration/knife/deps_spec.rb +++ b/spec/integration/knife/deps_spec.rb @@ -1,6 +1,6 @@ # # Author:: John Keiser (<jkeiser@chef.io>) -# Copyright:: Copyright 2013-2016, Chef Software Inc. +# Copyright:: Copyright 2013-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -211,20 +211,16 @@ depends "bar"' depends "baz"' file "cookbooks/baz/metadata.rb", 'name "baz" depends "foo"' - file "cookbooks/self/metadata.rb", 'name "self" -depends "self"' end it "knife deps prints each once" do - knife("deps /cookbooks/foo /cookbooks/self").should_succeed( - stdout: "/cookbooks/baz\n/cookbooks/bar\n/cookbooks/foo\n/cookbooks/self\n", - stderr: "WARN: Ignoring self-dependency in cookbook self, please remove it (in the future this will be fatal).\n" + knife("deps /cookbooks/foo").should_succeed( + stdout: "/cookbooks/baz\n/cookbooks/bar\n/cookbooks/foo\n" ) end it "knife deps --tree prints each once" do - knife("deps --tree /cookbooks/foo /cookbooks/self").should_succeed( - stdout: "/cookbooks/foo\n /cookbooks/bar\n /cookbooks/baz\n /cookbooks/foo\n/cookbooks/self\n", - stderr: "WARN: Ignoring self-dependency in cookbook self, please remove it (in the future this will be fatal).\n" + knife("deps --tree /cookbooks/foo").should_succeed( + stdout: "/cookbooks/foo\n /cookbooks/bar\n /cookbooks/baz\n /cookbooks/foo\n" ) end end diff --git a/spec/integration/knife/upload_spec.rb b/spec/integration/knife/upload_spec.rb index d372a83a35..dc713d02b3 100644 --- a/spec/integration/knife/upload_spec.rb +++ b/spec/integration/knife/upload_spec.rb @@ -1,6 +1,6 @@ # # Author:: John Keiser (<jkeiser@chef.io>) -# Copyright:: Copyright 2013-2016, Chef Software, Inc. +# Copyright:: Copyright 2013-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -178,16 +178,8 @@ EOM file "cookbooks/x/metadata.rb", "name 'x'; version '1.0.0'; depends 'x'" end - it "should warn", chef: "< 13" do - knife("upload /cookbooks").should_succeed( - stdout: "Updated /cookbooks/x\n", - stderr: "WARN: Ignoring self-dependency in cookbook x, please remove it (in the future this will be fatal).\n" - ) - knife("diff --name-status /").should_succeed "" - end - it "should fail in Chef 13", chef: ">= 13" do - knife("upload /cookbooks").should_fail "" - # FIXME: include the error message here + it "should fail in Chef 13" do + expect { knife("upload /cookbooks") }.to raise_error RuntimeError, /Cookbook depends on itself/ end end diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb index fb50ee2298..120e73740d 100644 --- a/spec/support/platform_helpers.rb +++ b/spec/support/platform_helpers.rb @@ -1,5 +1,6 @@ require "fcntl" require "chef/mixin/shell_out" +require "ohai/mixin/http_helper" require "ohai/mixin/gce_metadata" class ShellHelpers @@ -221,12 +222,12 @@ def fips? ENV["CHEF_FIPS"] == "1" end -class GCEDetector - extend Ohai::Mixin::GCEMetadata +class HttpHelper + extend Ohai::Mixin::HttpHelper end def gce? - GCEDetector.can_metadata_connect?(Ohai::Mixin::GCEMetadata::GCE_METADATA_ADDR, 80) + HttpHelper.can_socket_connect?(Ohai::Mixin::GCEMetadata::GCE_METADATA_ADDR, 80) rescue SocketError false end diff --git a/spec/support/shared/unit/execute_resource.rb b/spec/support/shared/unit/execute_resource.rb index ab6ed2b86b..2c556bb6cd 100644 --- a/spec/support/shared/unit/execute_resource.rb +++ b/spec/support/shared/unit/execute_resource.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Tyler Cloke (<tyler@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -76,14 +76,8 @@ shared_examples_for "an execute resource" do expect(@resource.group).to eql(1) end - it "should accept an array for the execution path in Chef-12 and log deprecation message", chef: "< 13" do - expect(Chef::Log).to receive(:warn).at_least(:once) - @resource.path ["woot"] - expect(@resource.path).to eql(["woot"]) - end - - it "should raise an exception in chef-13", chef: ">= 13" do - expect(@resource.path [ "woot" ]).to raise_error + it "the old path property (that never worked) is not supported in chef >= 13" do + expect { @resource.path [ "woot" ] }.to raise_error end it "should accept an integer for the return code" do diff --git a/spec/support/shared/unit/script_resource.rb b/spec/support/shared/unit/script_resource.rb index 27864e1625..a04da4b63e 100644 --- a/spec/support/shared/unit/script_resource.rb +++ b/spec/support/shared/unit/script_resource.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Tyler Cloke (<tyler@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,10 +34,6 @@ shared_examples_for "a script resource" do expect(script_resource.command).to be nil end - it "should set command to the name on the resource", chef: "< 13" do - expect(script_resource.command).to eql script_resource.name - end - it "should accept a string for the code" do script_resource.code "hey jude" expect(script_resource.code).to eql("hey jude") @@ -52,10 +48,6 @@ shared_examples_for "a script resource" do expect { script_resource.command("foo") }.to raise_error(Chef::Exceptions::Script) end - it "should not raise an exception if users set command on the resource", chef: "< 13" do - expect { script_resource.command("foo") }.not_to raise_error - end - describe "when executing guards" do let(:resource) do resource = script_resource diff --git a/spec/unit/lwrp_spec.rb b/spec/unit/lwrp_spec.rb index 9700b8ef2b..e167adb04c 100644 --- a/spec/unit/lwrp_spec.rb +++ b/spec/unit/lwrp_spec.rb @@ -1,6 +1,6 @@ # # Author:: Christopher Walters (<cw@chef.io>) -# Copyright:: Copyright 2009-2016, Chef Software Inc. +# Copyright:: Copyright 2009-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -324,14 +324,7 @@ describe "LWRP" do end end - def raise_if_deprecated! - if Chef::VERSION.split(".").first.to_i > 12 - raise "This test should be removed and the associated code should be removed!" - end - end - it "amends actions when they are already defined" do - raise_if_deprecated! expect(child.actions).to eq([:nothing, :eat, :sleep, :drink]) end end diff --git a/spec/unit/node_spec.rb b/spec/unit/node_spec.rb index ac227c5479..7dc7dd2380 100644 --- a/spec/unit/node_spec.rb +++ b/spec/unit/node_spec.rb @@ -1,6 +1,6 @@ # # Author:: Adam Jacob (<adam@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software, Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -1657,55 +1657,9 @@ describe Chef::Node do end - context "on Chef Client 13 and later" do - - # Though we normally attempt to provide compatibility with chef - # server one major version back, policyfiles were beta when we - # added the policyfile attributes to the node JSON, therefore - # policyfile users need to be on 12.3 minimum when upgrading Chef - # Client to 13+ - it "lets the 400 pass through", chef: ">= 13" do - expect { node.save }.to raise_error(http_exception) - end - - end - - context "when the node exists" do - - it "falls back to saving without policyfile attributes" do - expect(@rest).to receive(:put).with("nodes/example-node", node.for_json).and_raise(http_exception) - expect(@rest).to receive(:put).with("nodes/example-node", trimmed_node).and_return(@node) - expect { node.save }.to_not raise_error - end - - end - - context "when the node doesn't exist" do - - let(:response_404) do - Net::HTTPResponse.send(:response_class, "404").new("1.0", "404", "Not Found") - end - - let(:http_exception_404) do - begin - response_404.error! - rescue => e - e - end - end - - it "falls back to saving without policyfile attributes" do - expect(@rest).to receive(:put).with("nodes/example-node", node.for_json).and_raise(http_exception) - expect(@rest).to receive(:put).with("nodes/example-node", trimmed_node).and_raise(http_exception_404) - expect(@rest).to receive(:post).with("nodes", trimmed_node).and_return(@node) - node.save - end - - it "creates the node without policyfile attributes" do - expect(@rest).to receive(:post).with("nodes", node.for_json).and_raise(http_exception) - expect(@rest).to receive(:post).with("nodes", trimmed_node).and_return(@node) - node.create - end + it "lets the 400 pass through" do + expect(@rest).to receive(:put).and_raise(http_exception) + expect { node.save }.to raise_error(http_exception) end end diff --git a/spec/unit/policy_builder/expand_node_object_spec.rb b/spec/unit/policy_builder/expand_node_object_spec.rb index 420db2e855..a7f4f1fa43 100644 --- a/spec/unit/policy_builder/expand_node_object_spec.rb +++ b/spec/unit/policy_builder/expand_node_object_spec.rb @@ -1,6 +1,6 @@ # # Author:: Daniel DeLeo (<dan@chef.io>) -# Copyright:: Copyright 2014-2016, Chef Software, Inc. +# Copyright:: Copyright 2014-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,11 +34,7 @@ describe Chef::PolicyBuilder::ExpandNodeObject do expect(policy_builder).to respond_to(:node) end - it "implements a load_node method for backwards compatibility until Chef 13" do - expect(policy_builder).to respond_to(:load_node) - end - - it "has removed the deprecated #load_node method", chef: ">= 13" do + it "has removed the deprecated #load_node method" do expect(policy_builder).to_not respond_to(:load_node) end @@ -106,27 +102,6 @@ describe Chef::PolicyBuilder::ExpandNodeObject do end - context "deprecated #load_node method" do - - let(:node) do - node = Chef::Node.new - node.name(node_name) - node.run_list(["recipe[a::default]", "recipe[b::server]"]) - node - end - - before do - Chef::Config[:treat_deprecation_warnings_as_errors] = false - expect(Chef::Node).to receive(:find_or_create).with(node_name).and_return(node) - policy_builder.load_node - end - - it "loads the node" do - expect(policy_builder.node).to eq(node) - end - - end - context "once the node has been loaded" do let(:node) do node = Chef::Node.new diff --git a/spec/unit/provider/execute_spec.rb b/spec/unit/provider/execute_spec.rb index 1901e2ea03..904a2841c5 100644 --- a/spec/unit/provider/execute_spec.rb +++ b/spec/unit/provider/execute_spec.rb @@ -1,6 +1,6 @@ # # Author:: Prajakta Purohit (<prajakta@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -118,19 +118,9 @@ describe Chef::Provider::Execute do new_resource.creates "foo_resource" end - it "should warn in Chef-12", chef: "< 13" do - expect(Chef::Log).to receive(:warn).with(/relative path/) - expect(FileTest).to receive(:exist?).with(new_resource.creates).and_return(true) + it "should raise if user specified relative path without cwd for Chef-13" do expect(provider).not_to receive(:shell_out!) - provider.run_action(:run) - expect(new_resource).not_to be_updated - end - - it "should raise if user specified relative path without cwd for Chef-13", chef: ">= 13" do - expect(Chef::Log).to receive(:warn).with(/relative path/) - expect(FileTest).to receive(:exist?).with(new_resource.creates).and_return(true) - expect(provider).not_to receive(:shell_out!) - expect { provider.run_action(:run) }.to raise_error # @todo: add a real error for Chef-13 + expect { provider.run_action(:run) }.to raise_error(Chef::Exceptions::Execute) end end diff --git a/spec/unit/provider/powershell_script_spec.rb b/spec/unit/provider/powershell_script_spec.rb index 4fd3f3534d..d7a1620530 100644 --- a/spec/unit/provider/powershell_script_spec.rb +++ b/spec/unit/provider/powershell_script_spec.rb @@ -1,6 +1,6 @@ # # Author:: Adam Edwards (<adamed@chef.io>) -# Copyright:: Copyright 2013-2016, Chef Software Inc. +# Copyright:: Copyright 2013-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,10 +30,20 @@ describe Chef::Provider::PowershellScript, "action_run" do node end - let(:provider) do - empty_events = Chef::EventDispatch::Dispatcher.new - run_context = Chef::RunContext.new(node, {}, empty_events) + # code block is mandatory for the powershell provider + let(:code) { "" } + + let(:events) { Chef::EventDispatch::Dispatcher.new } + + let(:run_context) { run_context = Chef::RunContext.new(node, {}, events) } + + let(:new_resource) do new_resource = Chef::Resource::PowershellScript.new("run some powershell code", run_context) + new_resource.code code + new_resource + end + + let(:provider) do Chef::Provider::PowershellScript.new(new_resource, run_context) end diff --git a/spec/unit/provider/user/linux_spec.rb b/spec/unit/provider/user/linux_spec.rb index b04ada2511..063ca934c3 100644 --- a/spec/unit/provider/user/linux_spec.rb +++ b/spec/unit/provider/user/linux_spec.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Daniel DeLeo (<dan@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # # License:: Apache License, Version 2.0 # @@ -45,56 +45,18 @@ describe Chef::Provider::User::Linux do @current_resource = Chef::Resource::User::LinuxUser.new("adam", @run_context) end - it "supports manage_home does not exist", chef: ">= 13" do - expect( @new_resource.supports.key?(:manage_home) ).to be false + it "throws an error when trying to set supports manage_home: true" do + expect { @new_resource.supports( manage_home: true ) }.to raise_error(Chef::Exceptions::User) end - it "supports non_unique does not exist", chef: ">= 13" do - expect( @new_resource.supports.key?(:non_unique) ).to be false - end - - # supports is a method on the superclass so can't totally be removed, but we should aggressively NOP it to decisively break it - it "disables the supports API", chef: ">= 13" do - @new_resource.supports( manage_home: true ) - expect( @new_resource.supports.key?(:manage_home) ).to be false - end - - it "sets supports manage_home to false" do - expect( @new_resource.supports[:manage_home] ).to be false - end - - it "sets supports non-unique to false" do - expect( @new_resource.supports[:non_unique] ).to be false - end - - it "throws a deprecation warning on setting supports[:non_unique]" do - Chef::Config[:treat_deprecation_warnings_as_errors] = false - expect(Chef).to receive(:deprecated).with(:supports_property, "supports { non_unique: true } on the user resource is deprecated and will be removed in Chef 13, set non_unique true instead") - @new_resource.supports( non_unique: true ) - end - - it "throws a deprecation warning on setting supports[:manage_home]" do - Chef::Config[:treat_deprecation_warnings_as_errors] = false - expect(Chef).to receive(:deprecated).with(:supports_property, "supports { manage_home: true } on the user resource is deprecated and will be removed in Chef 13, set manage_home true instead") - @new_resource.supports( manage_home: true ) + it "throws an error when trying to set supports non_unique: true" do + expect { @new_resource.supports( non_unique: true ) }.to raise_error(Chef::Exceptions::User) end it "defaults manage_home to false" do expect( @new_resource.manage_home ).to be false end - it "supports[:manage_home] (incorectly) acts like manage_home" do - Chef::Config[:treat_deprecation_warnings_as_errors] = false - @new_resource.supports(manage_home: true) - expect( provider.useradd_options ).to eql(["-m"]) - end - - it "supports[:manage_home] does not change behavior of manage_home: false", chef: ">= 13" do - Chef::Config[:treat_deprecation_warnings_as_errors] = false - @new_resource.supports(manage_home: true) - expect( provider.useradd_options ).to eql(["-M"]) - end - it "by default manage_home is false and we use -M" do expect( provider.useradd_options ).to eql(["-M"]) end diff --git a/spec/unit/provider/user/pw_spec.rb b/spec/unit/provider/user/pw_spec.rb index 2f44d6f3e3..3637ce0b95 100644 --- a/spec/unit/provider/user/pw_spec.rb +++ b/spec/unit/provider/user/pw_spec.rb @@ -1,6 +1,6 @@ # # Author:: Stephen Haynes (<sh@nomitor.com>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,9 +32,7 @@ describe Chef::Provider::User::Pw do @new_resource.shell "/usr/bin/zsh" @new_resource.password "abracadabra" - # XXX: rip out in Chef-13 - Chef::Config[:treat_deprecation_warnings_as_errors] = false - @new_resource.supports manage_home: true + @new_resource.manage_home true @current_resource = Chef::Resource::User::PwUser.new("adam") @current_resource.comment "Adam Jacob" @@ -67,12 +65,6 @@ describe Chef::Provider::User::Pw do allow(@new_resource).to receive(attribute).and_return("hola") expect(@provider.set_options).to eql([ @new_resource.username, option, @new_resource.send(attribute), "-m"]) end - - it "should set the option for #{attribute} if the new resources #{attribute} is not null, without homedir management" do - allow(@new_resource).to receive(:supports).and_return(manage_home: false) - allow(@new_resource).to receive(attribute).and_return("hola") - expect(@provider.set_options).to eql([@new_resource.username, option, @new_resource.send(attribute)]) - end end it "should combine all the possible options" do @@ -123,7 +115,7 @@ describe Chef::Provider::User::Pw do describe "remove_user" do it "should run pw userdel with the new resources user name" do - @new_resource.supports manage_home: false + @new_resource.manage_home false expect(@provider).to receive(:shell_out!).with("pw", "userdel", @new_resource.username).and_return(true) @provider.remove_user end diff --git a/spec/unit/resource/chef_gem_spec.rb b/spec/unit/resource/chef_gem_spec.rb index c98b447582..2b09fb388f 100644 --- a/spec/unit/resource/chef_gem_spec.rb +++ b/spec/unit/resource/chef_gem_spec.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Bryan McLellan <btm@loftninjas.org> -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -42,8 +42,8 @@ describe Chef::Resource::ChefGem, "gem_binary" do expect(resource.gem_binary).to eql("#{RbConfig::CONFIG['bindir']}/gem") end - it "should set the gem_binary based on computing it from RbConfig" do - expect(resource.compile_time).to be nil + it "should set compile_time to false by default" do + expect(resource.compile_time).to be false end context "when building the resource" do @@ -70,22 +70,13 @@ describe Chef::Resource::ChefGem, "gem_binary" do expect(Chef::Resource::ChefGem).to receive(:new).and_return(resource) end - it "runs the install at compile-time by default", chef: "< 13" do - expect(resource).to receive(:run_action).with(:install) - expect(Chef::Log).to receive(:deprecation).at_least(:once) - recipe.chef_gem "foo" - end - - # the default behavior will change in Chef-13 - it "does not runs the install at compile-time by default", chef: ">= 13" do + it "does not runs the install at compile-time by default" do expect(resource).not_to receive(:run_action).with(:install) - expect(Chef::Log).not_to receive(:deprecation) recipe.chef_gem "foo" end it "compile_time true installs at compile-time" do expect(resource).to receive(:run_action).with(:install) - expect(Chef::Log).not_to receive(:deprecation) recipe.chef_gem "foo" do compile_time true end @@ -93,64 +84,27 @@ describe Chef::Resource::ChefGem, "gem_binary" do it "compile_time false does not install at compile-time" do expect(resource).not_to receive(:run_action).with(:install) - expect(Chef::Log).not_to receive(:deprecation) recipe.chef_gem "foo" do compile_time false end end - describe "when Chef::Config[:chef_gem_compile_time] is explicitly true" do - let(:chef_gem_compile_time) { true } - - before do - expect(Chef::Log).not_to receive(:deprecation) - end - - it "by default installs at compile-time" do - expect(resource).to receive(:run_action).with(:install) - recipe.chef_gem "foo" - end - - it "compile_time true installs at compile-time" do - expect(resource).to receive(:run_action).with(:install) - recipe.chef_gem "foo" do - compile_time true - end - end - - it "compile_time false does not install at compile-time" do - expect(resource).not_to receive(:run_action).with(:install) - recipe.chef_gem "foo" do - compile_time false - end - end + it "by default does not install at compile-time" do + expect(resource).not_to receive(:run_action).with(:install) + recipe.chef_gem "foo" end - describe "when Chef::Config[:chef_gem_compile_time] is explicitly false" do - - let(:chef_gem_compile_time) { false } - - before do - expect(Chef::Log).not_to receive(:deprecation) - end - - it "by default does not install at compile-time" do - expect(resource).not_to receive(:run_action).with(:install) - recipe.chef_gem "foo" - end - - it "compile_time true installs at compile-time" do - expect(resource).to receive(:run_action).with(:install) - recipe.chef_gem "foo" do - compile_time true - end + it "compile_time true installs at compile-time" do + expect(resource).to receive(:run_action).with(:install) + recipe.chef_gem "foo" do + compile_time true end + end - it "compile_time false does not install at compile-time" do - expect(resource).not_to receive(:run_action).with(:install) - recipe.chef_gem "foo" do - compile_time false - end + it "compile_time false does not install at compile-time" do + expect(resource).not_to receive(:run_action).with(:install) + recipe.chef_gem "foo" do + compile_time false end end end diff --git a/spec/unit/resource/execute_spec.rb b/spec/unit/resource/execute_spec.rb index 4c0ee694c3..69e4e91f2a 100644 --- a/spec/unit/resource/execute_spec.rb +++ b/spec/unit/resource/execute_spec.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Tyler Cloke (<tyler@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/spec/unit/resource/script_spec.rb b/spec/unit/resource/script_spec.rb index fca9fb0d7b..16f7650712 100644 --- a/spec/unit/resource/script_spec.rb +++ b/spec/unit/resource/script_spec.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Tyler Cloke (<tyler@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/spec/unit/resource/user_spec.rb b/spec/unit/resource/user_spec.rb index 138ffb1bfe..afd3969164 100644 --- a/spec/unit/resource/user_spec.rb +++ b/spec/unit/resource/user_spec.rb @@ -1,6 +1,6 @@ # # Author:: Adam Jacob (<adam@chef.io>) -# Copyright:: Copyright 2008-2016, Chef Software Inc. +# Copyright:: Copyright 2008-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -46,12 +46,12 @@ describe Chef::Resource::User, "initialize" do expect(@resource.action).to eql([:create]) end - it "should set supports[:manage_home] to false" do - expect(@resource.supports[:manage_home]).to eql(false) + it "should set manage_home to false" do + expect(@resource.manage_home).to eql(false) end - it "should set supports[:non_unique] to false" do - expect(@resource.supports[:non_unique]).to eql(false) + it "should set non_unique to false" do + expect(@resource.non_unique).to eql(false) end it "should set force to false" do diff --git a/spec/unit/run_list/versioned_recipe_list_spec.rb b/spec/unit/run_list/versioned_recipe_list_spec.rb index 91c601b294..859fee75ec 100644 --- a/spec/unit/run_list/versioned_recipe_list_spec.rb +++ b/spec/unit/run_list/versioned_recipe_list_spec.rb @@ -1,6 +1,6 @@ # # Author:: Stephen Delano (<stephen@chef.io>) -# Copyright:: Copyright 2010-2016, Chef Software Inc. +# Copyright:: Copyright 2010-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -186,9 +186,12 @@ describe Chef::RunList::VersionedRecipeList do end end - context "with duplicated names", chef: ">= 13" do - it "should fail in Chef 13" do - expect(list).to_not respond_to(:with_duplicate_names) + context "with duplicate names" do + let(:fq_names) { list.with_duplicate_names } + let(:recipes) { %w{ foo bar::default } } + + it "expands default recipes" do + expect(fq_names).to eq(%w{foo foo::default bar bar::default}) end end end |