summaryrefslogtreecommitdiff
path: root/spec/unit/provider/service/windows_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* fix 4 copsLamont Granquist2019-07-051-28/+46
| | | | | | | | | | | | | | - 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>
* tweak Lint/BlockAlignmentLamont Granquist2019-07-021-8/+8
| | | | | | | | | | | | | | | 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>
* 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>
* Merge pull request #7484 from chef/attribute_to_propertiesTim Smith2018-07-171-3/+3
|\ | | | | Update wording in resource specs for attributes -> properties
| * Update wording in resource specs for attributes -> propertiesTim Smith2018-07-101-3/+3
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Remove require mixlib/shellouts where not necessaryrequire_the_right_shelloutTim Smith2018-07-101-1/+0
|/ | | | | | the dscl user provider uses mixin/shell_out instead and the specs don't seem to use mixlib/shellout or actually need the require. Signed-off-by: Tim Smith <tsmith@chef.io>
* fix Style/UnneededInterpolationLamont Granquist2018-07-021-3/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-021-35/+35
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix :configure_startup action to configure delayed startJason Barnett2018-05-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Avoid lookups for rights of 'LocalSystem' in windows serviceBryan McLellan2018-03-291-8/+9
| | | | | | | | | | LocalSystem is a special account for the service subsystem, and the security subsystem doesn't know about it. It inherits rights from BUILTIN\Administrators so we don't need to check it for SeServiceLogonRight. Even if we look up System it wouldn't show up as it gets that right from hidden membership in BUILTIN\Administrators. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* mechanical conversion of most debug log statements to traceThom May2018-03-261-5/+8
| | | | Signed-off-by: Thom May <thom@chef.io>
* Remove platfom restrictions in provides and don't require providersTim Smith2018-03-071-1/+1
| | | | | | Don't require providers in the resources since we map these automatically. Also remove or simplify the platform restrictions in the provides lines in the resources. We're not really getting anything from these the way we wire up resources. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add description property to converge configure actionJason Barnett2018-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developer's Certificate of Origin 1.1 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>
* Remove temporary lineJason Barnett2018-01-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developer's Certificate of Origin 1.1 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>
* chefstyle -aJason Barnett2018-01-261-58/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developer's Certificate of Origin 1.1 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 existing tests and add new onesJason Barnett2018-01-261-19/+434
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developer's Certificate of Origin 1.1 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 Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-171-10/+10
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* autofixing whitespace copsLamont Granquist2016-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-021-2/+2
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-021-1/+1
| | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Use double quotes by defaultThom May2016-01-141-6/+6
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* fixes #3521 correcting format of user name passed to policy apis and does ↵Matt Wrock2015-12-291-27/+18
| | | | not clobber existing service rights of other users
* Remove pesky whitespacemcquin/remove-constClaire McQuin2015-09-211-1/+0
|
* Remove should from spec textClaire McQuin2015-09-211-28/+28
|
* Use letClaire McQuin2015-09-211-169/+170
|
* Safely clean up Win32 namespace after specsClaire McQuin2015-09-211-3/+14
|
* Enable Windows services to run as a different user (CHEF-4921). This adds ↵cdoherty-enhance-win-serviceChris Doherty2014-12-191-0/+94
| | | | | | | | :run_as_user and :run_as_password attributes to the windows_service resource. If a logon user is specified, the resource will (on every run) grant the logon-as-service privilege to that user, using secedit.exe.
* Update to RSpec 3.Claire McQuin2014-10-291-25/+25
|
* updating resources/providers unit tests to rpsec3Lamont Granquist2014-10-241-92/+92
| | | | mechanically generated patch using transpec 2.3.7 gem
* Do not use :Win32 outside of let, describe, it blocks since we don't have it ↵Serdar Sutay2014-08-121-8/+13
| | | | ready yet.
* CHEF-5022: Add tests for #set_start_type and cleanupBryan McLellan2014-08-121-3/+15
|
* CHEF-5022: Rename start_type to current_start_typeBryan McLellan2014-08-121-2/+2
| | | | This is to be more clear what current_start_type returns.
* CHEF-5022: leave enabled to nil for all other statesBryan McLellan2014-08-121-0/+7
|
* CHEF-5022: Add configure_startup actionBryan McLellan2014-08-121-40/+43
| | | | | | enable and disable actions will continue to set the startup type to automatic/disabled If you want the startup type to be manual, you can set the startup_type attribute and use action configure_startup. It also supports automatic and disabled.
* CHEF-5022: Differentiate between Windows service startup_typesBryan McLellan2014-08-121-10/+43
| | | | | | | | | A Windows service startup_type can be automatic, manual, or disabled. This adds a startup_type attribute to specify automatic or manual, and defaults to automatic because we currently have no functionality to set a service to manual. This is important because if you stop a service that is automatic, Windows will change the startup_type to manual.
* fix indentingClaire McQuin2014-06-181-5/+6
|
* CHEF-4600 Add timeout for Chef::Provider::Service::WindowsMatt2014-06-181-3/+13
|
* Fixed whitespace in changes.deployable2014-05-211-42/+83
| | | | | Fixed deprecation warnings for `stub!` and `mock` in tests. Added tests for `START_PENDING` and `STOP_PENDING` state to `stop_service` and `start_service`
* CHEF-4791 Add more windows service states to the start/stop control flowMatt2013-12-051-0/+20
| | | | http://msdn.microsoft.com/en-us/library/windows/desktop/ee126211(v=vs.85).aspx
* Normalize whitespace on all filesSeth Vargo2013-09-261-7/+7
|
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+235
The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!