summaryrefslogtreecommitdiff
path: root/spec/unit/provider/service
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-156-17/+17
| | | | | | | this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #7484 from chef/attribute_to_propertiesTim Smith2018-07-177-16/+16
|\ | | | | Update wording in resource specs for attributes -> properties
| * Update wording in resource specs for attributes -> propertiesTim Smith2018-07-107-16/+16
| | | | | | | | 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/TrailingCommaInHashLiteralLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/UnneededInterpolationLamont Granquist2018-07-025-14/+14
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/LeadingCommentSpaceLamont Granquist2018-07-022-3/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/DotPositionLamont Granquist2018-07-021-15/+15
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/IndentHeredocLamont Granquist2018-07-026-86/+86
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-0217-161/+161
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #7297 from jasonwbarnett/fix-windows-startupTim Smith2018-06-031-0/+5
|\ | | | | Fix :configure_startup action to configure delayed start
| * 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>
* | convert shell_out_with_systems_locale to `default_env: true`lcg/remove-shell-out-with-systems-localeLamont Granquist2018-05-309-83/+83
|/ | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix systemd_unit user property usageMal Graty2018-05-191-1/+1
| | | | | | | Use Etc.getpwnam rather than Etc.getpwuid, since getpwuid expects a UID and the resource provides a string. Signed-off-by: Mal Graty <mal.graty@googlemail.com>
* [Debian/Ubuntu] Detect init script service levelstm/ub_1404_serviceThom May2018-04-231-161/+41
| | | | | | | | | | Debian removed the no-op flag from update-rc.d, and so we're now unlinking services rather than just querying them. Just parsing the scripts ourselves is much safer. Fixes: #7119 Signed-off-by: Thom May <thom@chef.io>
* 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-262-7/+12
| | | | 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>
* remove callers of passwd ohai plugintm/disable_chatty_ohaiThom May2018-02-071-10/+2
| | | | Signed-off-by: Thom May <thom@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 svcadm clear to only run in maintenance statejsinha/fix_svcadmJaymala Sinha2017-12-071-5/+6
| | | | | Signed-off-by: Jaymala Sinha <jsinha@chef.io> Signed-off-by: Patrick Wright <patrick@chef.io>
* Merge pull request #6353 from mikedodge04/launchd2Tim Smith2017-09-061-1/+4
|\ | | | | Launchd should not load launchagents as root.
| * specMike Dodge2017-08-261-1/+1
| | | | | | | | Signed-off-by: Mike Dodge <mikedodge04@gmail.com>
| * specMike Dodge2017-08-261-1/+4
| | | | | | | | Signed-off-by: Mike Dodge <mikedodge04@gmail.com>
* | Ensure the service_name is always escaped when using systemdDavide Cavalca2017-07-101-21/+23
| | | | | | | | Signed-off-by: Davide Cavalca <dcavalca@fb.com>
* | Remove a whole bunch more stubbed property stuff.Noah Kantrowitz2017-04-115-15/+15
| | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* | need to call load_current_resource before this testLamont Granquist2017-04-011-1/+2
| | | | | | | | | | | | i wonder what it was tesing before... Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | few more stray popen4 failing specsLamont Granquist2017-04-011-0/+1
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fix remaining specs for popen4 removalLamont Granquist2017-04-012-44/+23
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | smf_recursive_dependencies: Separate the svcadm options passed to shell_out.markgibbons2017-02-171-3/+3
| | | | | | | | Signed-off-by: markgibbons <mark.gibbons@nordstrom.com>
* | Merge branch 'master' of https://github.com/chef/chef into ↵markgibbons2017-02-061-1/+1
|\ \ | |/ | | | | smf_recursive_dependencies
| * fixes Style/Semicolon coplcg/style-semicolonLamont Granquist2016-11-141-1/+1
| | | | | | | | | | | | these all seem like useless uses of semicolons. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | smf_recursive: Rename the property "recursive" to "options".markgibbons2016-12-121-4/+23
| | | | | | | | | | | | | | Allow options to be an array or a string. Allow the additional svcadm options for the enable and disable actions. Signed-off-by: markgibbons <mark.gibbons@nordstrom.com>
* | smf_recursive_dependencies: Allow solaris services to start recursively.markgibbons2016-11-151-0/+17
|/ | | | | | | | | Svcadm enable -s service only starts the named service. This commit adds the recursive option to start service dependencies recursively. The resulting command "svcadm enable -sr service" will try to start service dependencies before starting the named service. Signed-off-by: markgibbons <mark.gibbons@nordstrom.com>
* service - upstart restart - service status managed via attr_accessorAbhishekKr2016-09-101-4/+9
|
* Merge branch 'master' of https://github.com/chef/chefAbhishekKr2016-09-106-46/+69
|\
| * Use symbols instead of strings as keys for systemd user property (#5241)Joshua Miller2016-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | * Use symbols instead of strings as keys for systemd user property related funcs * Fix tests for provider/service/systemd for when user property is set * Change hash in systemctl_opts to use symbols instead of strings * Fix tests for chef/provider/systemd_unit.rb
| * Use upstart goal state as service statusEvan Gilman2016-08-241-12/+27
| | | | | | | | Solves #5204
| * fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-175-32/+40
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | service - upstart restart - fixing specs and call of stopAbhishekKr2016-06-291-2/+4
|/
* Improved test coverage for behavior with *_command.Noah Kantrowitz2016-03-151-0/+14
|
* rubocop fixesDavide Cavalca2016-03-071-4/+4
|