summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Don't uses regexes in splits when we don't need tono_regex_in_splitTim Smith2020-11-081-1/+1
| | | | | | We can do this with strings alone Signed-off-by: Tim Smith <tsmith@chef.io>
* Collapse more duplicate branchesTim Smith2020-11-061-3/+1
| | | | | | Simplify more case statements Signed-off-by: Tim Smith <tsmith@chef.io>
* Namespace ResourceInspector to avoid conflicts with Inspec's.Pete Higgins2020-11-021-3/+3
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Merge pull request #10545 from chef/out_to_execMatt Wrock2020-10-309-38/+342
|\ | | | | Improve Windows resource performance by converting powershell_out usage to powershell_exec
| * convert most internal powershell_out to powershell_execmwrock2020-10-289-38/+342
| | | | | | | | Signed-off-by: mwrock <matt@mattwrock.com>
* | Simplify regexes by removing extra character classesTim Smith2020-10-304-9/+9
| | | | | | | | | | | | We're working too hard here. No need for these. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Remove the provider_resolver specs that are not helpfulnuke_specsTim Smith2020-10-291-877/+0
| | | | | | | | | | | | | | | | | | | | | | | | This is a pretty useless test at this point: - Platform/platform_family/version combinations are invalid in a way that makes tests pass when they should not. Ex: all the solaris stuff - Platforms we don't support anymore - Fake version numbers that mean we're not testing what would actually make sense Signed-off-by: Tim Smith <tsmith@chef.io>
* | Fix specTim Smith2020-10-281-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Remove opensolaris as wellTim Smith2020-10-282-8/+4
| | | | | | | | | | | | | | | | | | | | https://en.wikipedia.org/wiki/OpenSolaris Latest release 2009.06 / June 1, 2009; 11 years ago "OpenSolaris is a discontinued open source computer operating system based on Solaris and created by Sun Microsystems." Signed-off-by: Tim Smith <tsmith@chef.io>
* | Remove support for nexentacore which has been dead since 2012Tim Smith2020-10-282-15/+9
|/ | | | | | | | | | | | | | https://en.wikipedia.org/wiki/Nexenta_OS "In late 2011, the Nexenta OS brand was terminated and replaced with Illumian, which is derived from community development for illumos and OpenIndiana, but was distinguished by its use of Debian packaging. Illumian version 1.0 was released in February 2012. Following the initial release of Illumian in 2012, the Illumian project was discontinued.[3]" and "Final release 3.1.3.5 (October 31, 2012; 7 years ago)" We never really support this and it's been dead dead dead for a long time. Just nuke it along with the helpers. There's no way anyone used these. Signed-off-by: Tim Smith <tsmith@chef.io>
* Moved device_fstab method from provider/mount/mount.rb to provider/mount.rb.antima-gupta2020-10-281-0/+30
| | | | | | | Compare current resource device with new resource device_fstab value. Added specs for device_unchaged? method changes. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* Merge repetitive conditionalsTim Smith2020-10-273-3/+3
| | | | | | So much easier to read and probably faster this way too. Signed-off-by: Tim Smith <tsmith@chef.io>
* missing fixesLamont Granquist2020-10-262-3/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Final batch of unified_mode providersLamont Granquist2020-10-265-53/+32
| | | | | | Also converts some of them to custom resources Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove an empty before block in a specTim Smith2020-10-261-3/+0
| | | | | | No need for this. Signed-off-by: Tim Smith <tsmith@chef.io>
* ensure powershell_package commands are run with tls 1.2mwrock2020-10-201-95/+87
| | | | Signed-off-by: mwrock <matt@mattwrock.com>
* Remove custom constant mocking in favor of rspec's.Pete Higgins2020-10-192-68/+24
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Merge pull request #10494 from chef/refactor-resource-guard-interpreterTim Smith2020-10-194-88/+18
|\ | | | | Refactor ResourceGuardInterpreter
| * Refactor resource guard interpreter.refactor-resource-guard-interpreterPete Higgins2020-10-164-88/+18
| | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* | Remove unit tests for ancient Debian / UbuntuTim Smith2020-10-191-10/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Added functional test for windows package with remote_file_attributes.antima-gupta2020-10-191-10/+36
| | | | | | | | Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* | Remove test for old monkeypatch.Pete Higgins2020-10-161-34/+0
|/ | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Merge pull request #10365 from chef/chef_configTim Smith2020-10-131-0/+137
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Chefstyle fixTim Smith2020-10-131-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Move some of the erb logic into the resourceTim Smith2020-10-131-6/+12
| | | | | | | | | | | | This makes it easier to read and easier to test Signed-off-by: Tim Smith <tsmith@chef.io>
| * chef_client_config resourceTim Smith2020-10-121-0/+131
| | | | | | | | | | | | Initial stab at a chef_client_config resource that will allow people to easily write out a client.rb. This isn't meant to cover every single use case, but instead to provide a simple resource that works for 99% of users. Signed-off-by: Tim Smith <tsmith@chef.io>
* | provide powershell_exec functionality on x86ps_exec_x86mwrock2020-10-091-1/+1
|/ | | | Signed-off-by: mwrock <matt@mattwrock.com>
* add interpreter to handle pwsh and powershell to powershell_scriptps_scriptmwrock2020-10-073-16/+70
| | | | Signed-off-by: mwrock <matt@mattwrock.com>
* fix specs on powershell v4 and belowmwrock2020-10-052-7/+7
| | | | Signed-off-by: mwrock <matt@mattwrock.com>
* Merge pull request #10476 from chef/exec_coreTim Smith2020-10-051-2/+39
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * add interpreter arg to powershell_exec allowing it to run powershell coremwrock2020-10-011-2/+39
| | | | | | | | Signed-off-by: mwrock <matt@mattwrock.com>
* | add interpreter arg to powershell_out allowing it to call pwsh.exemwrock2020-10-014-2/+30
|/ | | | Signed-off-by: mwrock <matt@mattwrock.com>
* Remove unncessary test state.remove-unnecessary-config-setting-in-testPete Higgins2020-09-251-4/+0
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Pull in the new tty-table to unlock new license-acceptancetty-tableTim Smith2020-09-203-5/+3
| | | | | | | | tty-table was holding back a bunch of deps. This will resolve several Ruby 2.7 warnings and lets use use the optimized license-acceptance gem that also had pete's better error handling. This also nukes a few deps to make chef/chef smaller. Includes misc chefstyle fixes for the new version Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix xml parsing specTim Smith2020-09-171-1/+67
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #10438 from chef/speedup_specsTim Smith2020-09-161-1/+1
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Speed up a openssl helper specsspeedup_specsTim Smith2020-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was one of our top 10 slow specs Before: Chef::Mixin::OpenSSLHelper#dhparam_pem_valid? When the dhparam.pem file does exist, and does contain a vaild dhparam key returns true 2.71 seconds ./spec/unit/mixin/openssl_helper_spec.rb:101 After: 0.01765 seconds ./spec/unit/mixin/openssl_helper_spec.rb:538 Chef::Mixin::OpenSSLHelper#dhparam_pem_valid? When the dhparam.pem file does exist, and does contain a vaild dhparam key returns true Signed-off-by: Tim Smith <tsmith@chef.io>
* | Update the spec for the new behaviorTim Smith2020-09-161-2/+1
| | | | | | | | | | | | | | Now that we don't check the value first we're only calling it once, which is :dope: Signed-off-by: Tim Smith <tsmith@chef.io>
* | Resolve Lint/RedundantRequireStatement warningsTim Smith2020-09-161-1/+0
|/ | | | | | | These are required by Ruby out of the box so lets avoid trying to require them again. Signed-off-by: Tim Smith <tsmith@chef.io>
* Update spec/unit/train_transport_spec.rbLamont Granquist2020-09-151-1/+1
| | | Co-authored-by: pete higgins <pete@peterhiggins.org>
* Move TrainTransport to ChefConfigLamont Granquist2020-09-151-13/+14
| | | | | | | | | | Also pull in some helpers from the Ohai work so that Ohai can use them later. This is code rearrangement to support the remote ohai work but does not change any existing behavior yet. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Move to using ChefConfig for CONF_DIRLance Albertson2020-09-151-1/+1
| | | | Signed-off-by: Lance Albertson <lance@osuosl.org>
* merge all dist files back into dist.rbMarc Chamberland2020-09-153-3/+3
| | | | | Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com> Signed-off-by: Lance Albertson <lance@osuosl.org>
* tighten all require statements for dist implementationMarc Chamberland2020-09-157-5/+7
| | | | | Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com> Signed-off-by: Lance Albertson <lance@osuosl.org>
* move dist implementation into chef-utilsMarc Chamberland2020-09-157-29/+29
| | | | | Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com> Signed-off-by: Lance Albertson <lance@osuosl.org>
* Allow users to take a String as wellTim Smith2020-09-111-2/+7
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Simplify validation and add some unit testsTim Smith2020-09-111-0/+20
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add initial unit testTim Smith2020-09-112-1/+31
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #10423 from chef/sidTim Smith2020-09-111-27/+108
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * allow the use of SIDs in windows securable resourcesmwrock2020-09-111-27/+108
| | | | | | | | Signed-off-by: mwrock <matt@mattwrock.com>