summaryrefslogtreecommitdiff
path: root/spec/unit/provider
Commit message (Collapse)AuthorAgeFilesLines
* fix 4 copsLamont Granquist2019-07-0514-80/+135
| | | | | | | | | | | | | | - 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/StringLiteralsInInterpolationLamont Granquist2019-07-052-2/+2
| | | | | | since we use double quotes, be consistent everywhere. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/RegexpLiteralLamont Granquist2019-07-055-29/+29
| | | | | | | 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-051-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/EmptyLiteralLamont Granquist2019-07-051-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* tweak Lint/BlockAlignmentLamont Granquist2019-07-023-29/+29
| | | | | | | | | | | | | | | 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>
* Layout/MultilineMethodCallIndentationLamont Granquist2019-07-021-146/+146
| | | | | | | | Layout/MultilineMethodCallIndentation: Enabled: true EnforcedStyle: indented Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/MethodCallWithoutArgsParenthesesLamont Granquist2019-07-0216-120/+120
| | | | | | | | 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-025-5/+5
| | | | | | start enforcing using %i{} instead of arrays of symbols Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/AlignArgumentslcg/new-chefstyleLamont Granquist2019-07-027-79/+79
| | | | | | | | | | | | | | this is using: Layout/AlignArguments: Enabled: true EnforcedStyle: with_fixed_indentation the default style can use really excessive whitespace. on starting lines which are already long, it fully indents across to where the arguments start and then begins the line there. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fixes for chefstyle bumpLamont Granquist2019-07-023-10/+10
| | | | | | | | result of automation https://github.com/chef/chefstyle/pull/72 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Parse day param value into stringVivek Singh2019-07-021-1/+6
| | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Fix service enable idempotency in sles11 (#8256)dheerajd-msys2019-05-231-2/+2
| | | | | | * fix service enable idempotency in sles11 Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* Merge pull request #8307 from ↵Tim Smith2019-05-074-172/+190
|\ | | | | | | | | 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-074-172/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | - Added a warning in case user is using a `environment` for an entry that ↵btm/MSYS-979vijaymmali19902019-05-031-20/+123
|/ | | | | | | | | | | | | | | | | | | can also be specified as a `property` - Added unit test cases - Ensured chefstyle - Added a warning in case user is using a `environment` for an entry that can also be specified as a `property` - Revert changes in order to pass chefstyle - Added a warning in case user is using a `environment` for an entry that can also be specified as a `property` - Added these changes in cron_different? method - Added unit test cases - Added some changes in cron.rb - It now throws error if user passes both environment with the {:SHELL, :HOME, :PATH, :MAILTO} and these properties itself. - It maintains idempotency. - Added Rspecs for this case. - Ensured chef-style. Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
* Prevent accidentally configuring windows_service propertiesJason Barnett2019-04-151-14/+0
| | | | Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* Fixes #8195Jason Barnett2019-03-271-24/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* Fix #8080Jason Barnett2019-03-081-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* Refactor windows_service unit testsJason Barnett2019-03-081-56/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* Ensure that a new blank line `\n\n` is added when appending a new mount ↵Gavin Reynolds2019-03-041-1/+9
| | | | | | | | point for AIX. Add existing mount to enable spec Signed-off-by: Gavin Reynolds <gavin@chef.io>
* Merge pull request #8228 from chef/user_cleanupTim Smith2019-02-193-48/+42
|\ | | | | Cleanup the user resource and convert it to the resource DSL + delete user_add provider
| * Fix mistake I made in a specTim Smith2019-02-191-1/+1
| | | | | | | | | | | | These needed to not match for this spec to work as expected Signed-off-by: Tim Smith <tsmith@chef.io>
| * Fix the comment specTim Smith2019-02-191-2/+1
| | | | | | | | | | | | This was entirely wrong. We're setting the comment to nil and proving that it ends up being the user and not the comment, but then we actually expected it to be the comment. This spec did not due what the description said it did. Now it does. Signed-off-by: Tim Smith <tsmith@chef.io>
| * Improve the lets in the dscl provider specsTim Smith2019-02-191-19/+15
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Fix bad spec descriptionsTim Smith2019-02-191-2/+2
| | | | | | | | | | | | These are the opposite Signed-off-by: Tim Smith <tsmith@chef.io>
| * Remove the legacy useradd user providerTim Smith2019-02-191-1/+0
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Convert the user resource to use the resource DSLTim Smith2019-02-191-24/+24
| | | | | | | | | | | | This is one of the last ones that needed to be updated for the resource DSL. This gets us quite a bit of resource inspector goodness. Signed-off-by: Tim Smith <tsmith@chef.io>
* | chocolatey_package private source specVivek Singh2019-02-141-0/+29
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Authentication on chocolatey_packageVivek Singh2019-02-121-1/+1
|/ | | | | | | - Add missing options cmd args while fetching choco list. - Fixed rspec. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Update the functional spec and provider behavior to matchJoshua Justice2019-02-071-8/+0
| | | | Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
* Add a test for this situation so we don't make the same mistake twice.Joshua Justice2019-02-061-0/+9
| | | | Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
* Merge pull request #8165 from jjustice6/solaris_usermodTim Smith2019-02-062-1/+105
|\ | | | | Create a separate Group provider for Solaris systems.
| * Update copyright yearTim Smith2019-01-251-1/+1
| | | | | | | | | | Co-Authored-By: jjustice6 <jjustice6@bloomberg.net> Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
| * Chefstyle nitpicksJoshua Justice2019-01-251-3/+3
| | | | | | | | Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
| * Fix up headers and remove references to old versions of solarisJoshua Justice2019-01-252-2/+1
| | | | | | | | Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
| * Start modifying the files.Joshua Justice2019-01-251-24/+14
| | | | | | | | Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
| * Starting point: copy usermod and usermod specJoshua Justice2019-01-251-0/+115
| | | | | | | | Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
* | Prefer user defined flags over the default oneNimesh-Msys2019-02-041-10/+19
|/ | | | Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* Remove support for unsupported opensuse < 42 from group providerTim Smith2019-01-241-2/+0
| | | | | | | | We had a few places where we checked for legacy opensuse platforms. Chef 15 doesn't support this platform and you won't be able to find binaries via omnitruck. We might as well yank out a bit of provider logic. Also for some reason usermod has logic in a method for suse, but the provider didn't support that. Signed-off-by: Tim Smith <tsmith@chef.io>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-1522-74/+74
| | | | | | | this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #8110 from chef/mac_os_user_cleanupTim Smith2019-01-141-303/+86
|\ | | | | user resource: Remove support for macOS 10.7 and 10.7 upgraded to 10.8+
| * user resource: Remove support for macOS 10.7 and 10.7 upgraded to 10.8+Tim Smith2019-01-141-303/+86
| | | | | | | | | | | | We can greatly simplify our dscl user provider by removing support for macOS 10.7 and 10.7 which has been upgraded to 10.8. No one is using this anyone as it's beyond EOL with Apple and has been for years. Signed-off-by: Tim Smith <tsmith@chef.io>
* | change HTTPServerException to HTTPClientException for ruby 2.6Lamont Granquist2019-01-031-2/+2
|/ | | | | | includes backcompat for 2.5 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Added support for setting the comment/description on a group in Windows. ↵Kapil Chouhan2018-12-131-0/+15
| | | | | | This is only for the Windows group. Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* fix unit specslcg/snap_package_supportLamont Granquist2018-11-281-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* chefstyle fixes ONLYS.Cavallo2018-11-281-10/+10
| | | | Signed-off-by: S.Cavallo <smcavallo@hotmail.com>
* add method to generate multiipart form dataS.Cavallo2018-11-281-23/+41
| | | | | move snap api json response into fixture data - chefstyle was very unhappy with inline data defs Signed-off-by: S.Cavallo <smcavallo@hotmail.com>
* chef-style fixes ONLYS.Cavallo2018-11-281-10/+10
| | | | Signed-off-by: S.Cavallo <smcavallo@hotmail.com>
* initial suppport for snap packagesS.Cavallo2018-11-281-0/+190
| | | | Signed-off-by: S.Cavallo <smcavallo@hotmail.com>