summaryrefslogtreecommitdiff
path: root/spec/unit/resource
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #10279 from chef/remove-instance-variable-from-shared-contextTim Smith2020-08-073-18/+22
|\ | | | | Clean up some interdependencies in script resource tests.
| * Clean up some interdependencies in script resource tests.Pete Higgins2020-08-073-18/+22
| | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* | Remove an unnecessary shared_context.Pete Higgins2020-08-071-118/+113
|/ | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Simplify property definition.Pete Higgins2020-08-071-18/+1
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Convert osx_profile to custom resourcelcg/osx_profileLamont Granquist2020-08-031-0/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also does some code cleanup. The path property has been removed as a property since it was never an input to the resource, and just some state that was necessary to abuse the tempfile mechanism. Documented the abuse of the tempfile mechanism for now (I think I actually recall signing off on this awhile back because there was no better way to do it, so its all half my fault, it's still horrible) The actual shell_out calls now raise. This might cause problems? I don't know, but it seems real bad to just blindly swallow errors and continue. Feels like more of a bugfix than a breaking change, but it isn't documented clearly as to why those errors were being ignored anywhere and didn't break any tests so it appears to be a coding error. The mutation of the new_resource was removed (other than the tempfile hack) and migrated to state on the provider. Removed some weird return values on things that are called from a void context. Added some lazy initializers for stuff that made it a lot more readable Converted the cookbook_file resource to a real cookbook_file now that we're in unified_mode. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #9820 from ↵Tim Smith2020-07-311-4/+30
|\ | | | | | | | | MsysTechnologiesllc/dh/fix_feature_install_when_state_is_removed Fix install windows features when install state is removed
| * additional testsdheerajd-msys2020-07-311-0/+20
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
| * tests addeddheerajd-msys2020-07-301-0/+10
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
| * Fix install features when install state is removeddheerajd-msys2020-05-071-4/+0
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | eql -> eq in the specsTim Smith2020-07-211-17/+17
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Update spec/unit/resource/macos_user_defaults_spec.rb Tim Smith2020-07-211-1/+1
| | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io> Co-authored-by: pete higgins <pete@peterhiggins.org>
* | Make sure we can compare keys in dictsTim Smith2020-07-211-0/+5
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Add spec for dict valuesTim Smith2020-07-201-0/+5
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Add specs and squash bugs that showed upTim Smith2020-07-201-7/+32
| | | | | | | | | | | | | | | | - Add back method to convert boolean-ish values to TRUE/FALSE - Be explicit about string values as well as all the other types so we always pass a type - Fix the type flag in the write command Signed-off-by: Tim Smith <tsmith@chef.io>
* | Avoid failures if the host was named "current" and add some more testsTim Smith2020-07-201-1/+33
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Add specs for defaults_export_cmdTim Smith2020-07-201-0/+22
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Test the default property valuesTim Smith2020-07-201-0/+12
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge branch 'master' of github.com:chef/chef into windows_firewall_profileDavin Taddeo2020-07-151-0/+10
|\ \
| * | Fix execute resource with integer user parameter.Pete Higgins2020-07-131-0/+10
| | | | | | | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* | | fix the name of the windows_firewall_profile spec.Davin Taddeo2020-07-101-16/+16
| | | | | | | | | | | | | | | | | | Update the tests to accept ruby true/false as the correct (non-erroring) value Signed-off-by: Davin Taddeo <davin@chef.io>
* | | Merge branch 'master' of github.com:chef/chef into windows_firewall_profileDavin Taddeo2020-07-101-0/+1
|\ \ \ | |/ /
| * | Update test for Windows package installer_type since the resource behavior ↵Pete Higgins2020-07-071-0/+1
| | | | | | | | | | | | | | | | | | changed. Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* | | Merge branch 'master' of github.com:chef/chef into windows_firewall_profileDavin Taddeo2020-07-023-12/+32
|\ \ \ | |/ /
| * | Pick some of the unit test fixes from #10068lcg/win-unit-test-cherrypickLamont Granquist2020-06-263-12/+32
| | | | | | | | | | | | | | | | | | This picks some of the more obviously correct looking fixes from #10068 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | Merge branch 'master' of github.com:chef/chef into windows_firewall_profileDavin Taddeo2020-06-202-3/+7
|\ \ \ | |/ /
| * | Merge pull request #10001 from chef/cron_cleanupTim Smith2020-06-152-3/+7
| |\ \ | | | | | | | | Cron and Cron_d resource weekday property fixes
| | * | removed cron helper filesantima-gupta2020-06-101-31/+0
| | | | | | | | | | | | | | | | Signed-off-by: antima-gupta <agupta@msystechnologies.com>
| | * | Added freeze for WEEKDAYS constant.antima-gupta2020-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed chefstyle spec failure. Made changes as per review comment. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
| | * | Fixed cron resource weekday property.antima-gupta2020-06-103-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented same weekday functionality for cron_d resource. Fixed rspec failure. Added cron helper for weekday functionality Added spec for cron helper. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* | | | unit test fix and chefstyle fixesDavin Taddeo2020-06-151-10/+10
| | | | | | | | | | | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
* | | | here's a rewrite that's hopefully more inline with what @tas50 was thinking ↵Davin Taddeo2020-06-151-31/+24
| | | | | | | | | | | | | | | | | | | | | | | | in the previous rounds of comments. Signed-off-by: Davin Taddeo <davin@chef.io>
* | | | Merge branch 'master' of github.com:chef/chef into windows_firewall_profileDavin Taddeo2020-06-151-0/+64
|\ \ \ \ | |/ / / | | | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
| * | | updates for chefstyle and spellcheck errorsDavin Taddeo2020-06-151-1/+0
| | | | | | | | | | | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
| * | | missed commiting the reference to the full chain to reference the ↵Davin Taddeo2020-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | WIN_AUDIT_SUBCATEGORIES constant Signed-off-by: Davin Taddeo <davin@chef.io>
| * | | still not sure if I'm calling this constant right... if this doesn't work, I ↵Davin Taddeo2020-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | guess I'll ask for help or something ;) Signed-off-by: Davin Taddeo <davin@chef.io>
| * | | hoping this fixes my uninitialized constant issueDavin Taddeo2020-06-151-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
| * | | Updated code to reflect feedback from @phigginsDavin Taddeo2020-06-151-72/+10
| | | | | | | | | | | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
| * | | Merge branch 'master' of github.com:chef/chef into windows_audit_policyDavin Taddeo2020-06-111-1/+1
| |\ \ \
| * | | | chefstyle and spellcheck fixes.Davin Taddeo2020-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
| * | | | fixing a lot more :facepalm: copy/paste errors.Davin Taddeo2020-06-111-4/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
| * | | | Create windows_audit_policy resource and some unit tests for it.Davin Taddeo2020-06-101-0/+126
| | |/ / | |/| | | | | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
* | | | Fix a description and hopefully fix a unit test typoDavin Taddeo2020-06-151-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
* | | | fix some unit tests and remove nexted ternary operators to make chefstyle ↵Davin Taddeo2020-06-151-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | happier Signed-off-by: Davin Taddeo <davin@chef.io>
* | | | fix the spec file to fix unit tests by making rspec happy. fix some ↵Davin Taddeo2020-06-151-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | spellcheck issues and chefstyle issues as well. Signed-off-by: Davin Taddeo <davin@chef.io>
* | | | push windows_firewall_profile resource to open a PR with.Davin Taddeo2020-06-151-0/+88
| |/ / |/| | | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
* | | Fix a test to silence an rspec warning.cleanup-resource-inheritancePete Higgins2020-06-101-1/+1
|/ / | | | | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* | Merge pull request #9920 from chef-davin/masterTim Smith2020-06-051-5/+15
|\ \ | | | | | | Update to the chef_client_scheduled_task resource frequency_modify default functionality
| * | Modify my fixes for the windows unit tests so that I don't break all the ↵Davin Taddeo2020-06-031-4/+4
| | | | | | | | | | | | | | | | | | Linux unit tests... Signed-off-by: Davin Taddeo <davin@chef.io>
| * | unit test updates for chef_client_scheduled taskDavin Taddeo2020-06-031-5/+15
| | | | | | | | | | | | Signed-off-by: Davin Taddeo <davin@chef.io>
* | | Merge pull request #9932 from chef/script-resources-use-pipesTim Smith2020-06-051-15/+10
|\ \ \ | | | | | | | | Change script resources to use pipes rather than writing to temp files