summaryrefslogtreecommitdiff
path: root/spec/support
Commit message (Collapse)AuthorAgeFilesLines
* Add chef-utils gem with various recipe DSL helpersLamont Granquist2019-11-086-8/+10
| | | | | | | | | | | | | This is the implementation of [RFC-087](https://github.com/chef-boneyard/chef-rfc/blob/master/rfc087-distro-sugar-helpers.md) although some of the specifics have been iterated on and changed. The documentation will be in the [README.md](https://github.com/chef/chef/tree/master/chef-utils/README.md) once this is merged. While this PR mostly moves chef-sugar utilities into core-chef via this chef-utils gem, the scope of the chef-utils gem should be considered larger than just that. As an example this PR moves the Mash class into this gem for reuse in ohai as well. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #8775 from chef/ryancragun/mac_userTim Smith2019-09-091-0/+10
|\ | | | | Add mac_user resource that is compatible with macOS >= 10.14
| * add functional testryancragun/mac_userRyan Cragun2019-09-031-0/+10
| | | | | | | | Signed-off-by: Ryan Cragun <ryan@chef.io>
* | remove app_server_support spec filelcg/remove-support-specLamont Granquist2019-08-282-41/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert to using TinyServer and remove the duplicated functionality with the "app_server_support" helper. The fact that this change hits the knife raw / knife redirection specs that have so many timeout issues is very likely not a coincidence. I would bet a small, but not entirely insignificant amount of money that this makes those timeout issues go away. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | only test these on rhel >= 8 where they worklcg/fix-dnf-rhel8Lamont Granquist2019-07-191-0/+8
|/ | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix 4 copsLamont Granquist2019-07-054-30/+30
| | | | | | | | | | | | | | - Layout/MultilineMethodCallBraceLayout - Layout/ClosingParenthesisIndentation - Layout/IndentFirstArgument EnforcedStyle: consistent - Layout/BlockEndNewline the first of these autocorrected to horrible looking code which exposed that we really needed the other three as well, which also cleaned up a bunch of other terrible looking code. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/SymbolProcLamont Granquist2019-07-053-37/+13
| | | | | | enforce pretzels. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/StringLiteralsInInterpolationLamont Granquist2019-07-055-7/+7
| | | | | | since we use double quotes, be consistent everywhere. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/RegexpLiteralLamont Granquist2019-07-051-1/+1
| | | | | | | given how many regexps we have with /'s in the match this seems like a very good one. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/NegatedIfLamont Granquist2019-07-055-8/+8
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/EmptyLiteralLamont Granquist2019-07-052-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/EmptyMethodLamont Granquist2019-07-021-8/+4
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* tweak Lint/BlockAlignmentLamont Granquist2019-07-021-2/+2
| | | | | | | | | | | | | | | Lint/BlockAlignment: Enabled: true EnforcedStyleAlignWith: start_of_block this works better with Layout/MultilineMethodCallIndentation to force indentation of multiline method calls that wind up with multiline blocks. i'd probably pull back the end to match with the start of the expression but this gets the indentation level inside the block correct. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/MethodCallWithoutArgsParenthesesLamont Granquist2019-07-021-1/+1
| | | | | | | | zero args methods don't get parens. this certainly reads better than the inverse. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/SymbolArrayLamont Granquist2019-07-024-14/+14
| | | | | | start enforcing using %i{} instead of arrays of symbols Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/EmptyLineAfterGuardClauseLamont Granquist2019-07-023-0/+8
| | | | | | | i like this one, gives visual priority to returns or raises that are buried in the middle of things. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix service enable idempotency in sles11 (#8256)dheerajd-msys2019-05-231-0/+4
| | | | | | * fix service enable idempotency in sles11 Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* Merge pull request #8307 from ↵Tim Smith2019-05-071-0/+95
|\ | | | | | | | | MsysTechnologiesllc/Kapil/MSYS-986_Move_response_file_and_response_file_variables_out_of_base_package_resource package: move response_file and response_file_variables out of base package resource
| * Move response_file and response_file_variables out of base package resourceKapil Chouhan2019-05-071-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com> Fix for Move response_file and response_file_variables out of base package resource Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com> update require changes Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com> Updated require changes Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com> Fixed some unit test cases Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* | Merge pull request #8417 from jaymzh/link_messageLamont Granquist2019-04-301-0/+1
|\ \ | | | | | | file: Tell people what file a link is pointing at in warning messages
| * | Tell people what file a link is pointing at.Phil Dibowitz2019-04-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the event you are managing a file `/etc/file` with a `file` resource, but it turns out to be a link to `/etc/passwd` and you are trying to figure out what overwrite `/etc/passwd`, there is no indication in the logs. Let's add one. Signed-off-by: Phil Dibowitz <phil@ipom.com>
* | | Add train-core. Remove chef-core references outside of bootstrapMarc A. Paradise2019-04-291-1/+0
|/ / | | | | | | Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
* | Merge pull request #8168 from ↵Bryan McLellan2019-04-263-83/+116
|\ \ | |/ |/| | | | | MsysTechnologiesllc/Vijay/MSYS-958_write_permissions_does_not_work_properly_on_windows Fix for write permissions were not working properly on windows
| * Minor fixes as per the review commentsvijaymmali19902019-02-123-97/+103
| | | | | | | | | | | | | | | | | | | | - Using proper verbiage for constant SUBFOLDERS_AND_FILES_ONLY - Source https://metacpan.org/pod/Win32::Security::ACE#dbmAceFlags - Minor DRY up and Fixes - Ensured chefstyle Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
| * - Minor fixes to fix functional test casesvijaymmali19902019-02-113-14/+41
| | | | | | | | | | | | | | | | - Added functional test cases for deny_rights option - Ensured chef style - Fixes MSYS-958 Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
| * Minor fixes as per the review commentsvijaymmali19902019-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Using proper verbiage for constant WRITE - Source https://docs.microsoft.com/en-us/dotnet/api/system.security.accesscontrol.filesystemrights?view=netframework-4.7.2#fields - Straight away using constants instead of it's fully qualified path - Minor DRY up and Fixes - Fixed functional test cases - Ensured chefstyle Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
* | Add chef/text require before Rubygems breaks YAMLMarc A. Paradise2019-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | Rubygems monkeypatches YAML for backwards compatibility, but this is not compatible with r18n library's usage; add the require here to ensure that it's loaded before rubygems, allowing tests that refer to this file to run in isolation. Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
* | Note that this helper method is no longer a backportkill_old_ruby_speccsTim Smith2019-03-111-4/+3
| | | | | | | | | | | | | | | | This was an undocumented method that was removed from Ruby 2.5. It's ours now. https://github.com/ruby/ruby/commit/25d56ea7b7b52dc81af30c92a9a0e2d2dab6ff27 Signed-off-by: Tim Smith <tsmith@chef.io>
* | Extract Action Collection from Data CollectorLamont Granquist2019-03-112-409/+0
|/ | | | | | See the PR for details on this change. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* As per the review commentsNimesh-Msys2019-02-041-1/+1
| | | | | | | - Using `flags` attribute from resources itself - Fixed and add the required test cases Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-152-6/+6
| | | | | | | this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* change HTTPServerException to HTTPClientException for ruby 2.6Lamont Granquist2019-01-033-8/+8
| | | | | | includes backcompat for 2.5 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Cleanup some functional helpersfunctional_cleanupTim Smith2018-12-041-13/+0
| | | | | | Rename the macos helpers. Remove unused helpers to check for RHEL 5 and < Windows 2008 R2. Signed-off-by: Tim Smith <tsmith@chef.io>
* fix the knife integration spec timeoutsLamont Granquist2018-11-081-2/+2
| | | | | | | | | rely on killing the thread to terminate the server, and rely on thread#join to correctly signal to the main thread that the server thread is dead, don't leak the server object out of the helper. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix testing / installing on SLES 15sles15_symlinksTim Smith2018-10-301-1/+2
| | | | | | | Make sure we identify SLES 15 as suse for our zypper tests Make sure we don't remove the symlinks on SLES when doing an upgrade or the new release will be broken Signed-off-by: Tim Smith <tsmith@chef.io>
* switch shell_out to shell_out! in func testslcg/shell-out-mknodLamont Granquist2018-08-211-5/+5
| | | | | | not failing here hides issues caused by e.g. mknod not working properly. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #7390 from coderanger/yet-more-credsLamont Granquist2018-07-031-1/+7
|\ | | | | knife config and a bunch of UX improvements
| * Merge branch 'master' into yet-more-credsNoah Kantrowitz2018-07-0215-107/+107
| |\ | | | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
| * | Apparently the block argument is already in use with `knife()` even though I ↵Noah Kantrowitz2018-06-241-2/+2
| | | | | | | | | | | | | | | | | | can't figure out quite how. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
| * | Add tests for `knife config`.Noah Kantrowitz2018-06-231-1/+7
| | | | | | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* | | fix Style/MutableConstantLamont Granquist2018-07-021-1/+1
| |/ |/| | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fix Layout/LeadingCommentSpaceLamont Granquist2018-07-023-4/+4
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fix Layout/DotPositionLamont Granquist2018-07-022-34/+34
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fix Style/HashSyntaxLamont Granquist2018-07-0215-76/+76
|/ | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Unification of shell_out APIsLamont Granquist2018-06-151-11/+11
| | | | | | | converts all usage to just shell_out() from the numerous helper utilities that we've had previously. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Use local computer name instead of domain in testssp/win10_fix_securable_resource_testsStuart Preston2018-05-301-1/+1
| | | | Signed-off-by: Stuart Preston <stuart@chef.io>
* Merge pull request #7249 from chef/lcg/cleanup-userLamont Granquist2018-05-211-3/+3
|\ | | | | Cleanup AIX and Solaris user resources.
| * clean up updating_home?lcg/cleanup-userLamont Granquist2018-05-101-3/+3
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Add additional resource specsTim Smith2018-05-161-1/+1
|/ | | | | | Auto generated from the resource inspector Signed-off-by: Tim Smith <tsmith@chef.io>
* fix application tests on linuxThom May2018-04-301-0/+1
| | | | Signed-off-by: Thom May <thom@chef.io>