summaryrefslogtreecommitdiff
path: root/spec/unit
Commit message (Collapse)AuthorAgeFilesLines
* Avoid ambiguous regexesambiguous_regexTim Smith2020-11-2114-36/+36
| | | | | | Just makes it a bit easier to read. Signed-off-by: Tim Smith <tsmith@chef.io>
* include password in guard inherited attributesguard_passwordmwrock2020-11-201-2/+2
| | | | Signed-off-by: mwrock <matt@mattwrock.com>
* Fix user output to say waht changedPhil Dibowitz2020-11-181-1/+7
| | | | | | | | | | | | | | | | | | | | | Fixes #10645 Linux: ``` [2020-11-18T12:09:31-08:00] INFO: Processing linux_user[bin] action create (/var/chef/cache/cookbooks/fb_users/resources/default.rb line 118) [2020-11-18T12:09:32-08:00] INFO: linux_user[bin] altered, change shell from /usr/sbin/phil to /usr/sbin/nologin ``` Windows: ``` [2020-11-18T12:18:02-08:00] INFO: windows_user[john] altered, update password ``` Note this does not fix an ongoing but where no matter waht you set the password to it always thinks it needs to be updated, likely a bug somewhere in Chef::Util::Windows::NetUser, and vaguely related to #10455 Signed-off-by: Phil Dibowitz <phil@ipom.com>
* Merge pull request #10472 from ↵Tim Smith2020-11-161-10/+21
|\ | | | | | | | | MsysTechnologiesllc/antima/fixes_for_mutltiple_entry_in_fstab Signed-off-by: Tim Smith <tsmith@chef.io>
| * Added update_or_delete_fs method to fix the order change.antima-gupta2020-11-121-1/+21
| | | | | | | | | | | | Added specs for the changes. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
| * Updated enabled? method to fix multiple entry issue in fstab.antima-gupta2020-11-121-9/+0
| | | | | | | | | | | | Fixed test case failure. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* | Remove the specs for the plist parsingbuild_essentialTim Smith2020-11-133-142/+0
| | | | | | | | | | | | There's really no point in testing this method now since it would be us mocking out junk only. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #10642 from jaymzh/groupfixesTim Smith2020-11-132-1/+7
|\ \ | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Fix tests; improve outputPhil Dibowitz2020-11-122-1/+7
| |/ | | | | | | Signed-off-by: Phil Dibowitz <phil@ipom.com>
* | Added not_supported_on_solaris because it can't cope with LABEL and UUID ↵antima-gupta2020-11-131-1/+2
|/ | | | | | device type. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* Merge pull request #10631 from chef/lcg/zypper-fixTim Smith2020-11-112-27/+2
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * fix specLamont Granquist2020-11-111-2/+2
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * update zypper_packageLamont Granquist2020-11-111-25/+0
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Add additional property coerce specs to mountmount_specTim Smith2020-11-111-3/+17
| | | | | | | | | | | | Test the transforms we perform on these inputs Signed-off-by: Tim Smith <tsmith@chef.io>
* | Fixed chefstyle spec failure.antima-gupta2020-11-111-1/+1
| | | | | | | | Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* | Fixed spec failure when mount_point property is not set.antima-gupta2020-11-111-2/+1
| | | | | | | | Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* | Fixes for CIFS mount not idempotent issue.antima-gupta2020-11-111-0/+10
|/ | | | | | | Added spec for network device found as mounted. Removed '/' from end of the device value. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* Merge pull request #10613 from ↵Tim Smith2020-11-101-0/+16
|\ | | | | | | | | MsysTechnologiesllc/Kapil/Github-10201_Add_deprecation_for_enforce_path_sanity Signed-off-by: Tim Smith <tsmith@chef.io>
| * Added deprecation warning for enforce_path_sanityKapil Chouhan2020-11-101-0/+16
| | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* | 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>
* 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-302-22/+21
|\ | | | | Improve Windows resource performance by converting powershell_out usage to powershell_exec
| * convert most internal powershell_out to powershell_execmwrock2020-10-282-22/+21
| | | | | | | | Signed-off-by: mwrock <matt@mattwrock.com>
* | Simplify regexes by removing extra character classesTim Smith2020-10-303-6/+6
| | | | | | | | | | | | 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-281-5/+1
| | | | | | | | | | | | | | | | | | | | 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-271-1/+1
| | | | | | 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-264-50/+30
| | | | | | 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>
* Merge pull request #10494 from chef/refactor-resource-guard-interpreterTim Smith2020-10-192-85/+15
|\ | | | | Refactor ResourceGuardInterpreter
| * Refactor resource guard interpreter.refactor-resource-guard-interpreterPete Higgins2020-10-162-85/+15
| | | | | | | | 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>
* | 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-072-2/+13
| | | | Signed-off-by: mwrock <matt@mattwrock.com>
* fix specs on powershell v4 and belowmwrock2020-10-051-6/+6
| | | | 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-011-0/+14
|/ | | | 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-202-2/+2
| | | | | | | | 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>