summaryrefslogtreecommitdiff
path: root/spec/unit/provider
Commit message (Collapse)AuthorAgeFilesLines
* fix powershell_script tests for mandatory code blocksLamont Granquist2017-02-281-4/+14
| | | | | | | yet another lesson that doing too much in the initializer is poor coding practice. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-13: relative creates paths in the execute resource requires a cwdLamont Granquist2017-02-281-13/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-13: Remove supports API from all user providersLamont Granquist2017-02-282-54/+8
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add a spec for apt_package install with quoted optionsmh/apt_package_fixMark Harrison2017-02-231-0/+10
| | | | Signed-off-by: Mark Harrison <mark@mivok.net>
* fix specs: RedundantReturn, RedundantSelf, RedundantBeginLamont Granquist2017-02-132-3/+3
| | | | | | department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* package provider cleanuplcg/package-cleanupLamont Granquist2017-02-1121-308/+317
| | | | | | | | | - cleans up a lot of ivar usage - converts most providers to shell_out_compact_timeout! - almost deprecates a few APIs, but can't quite yet - windows providers need mixlib-shellout to take an argv Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #5791 from chef/tduffield/COOL-612/yum-provider-archTom Duffield2017-02-081-40/+47
|\ | | | | Add mutlipackage_api support to yum_package provider
| * Add mutlipackage_api support to yum_package Providertduffield/COOL-612/yum-provider-archTom Duffield2017-02-081-58/+47
| | | | | | | | | | | | | | | | | | An initial refactor to add multipackage_api support to the yum_package provider. There probably needs to be an additional refactor to make this provider look a little bit more like the DNF provider, but this should buy us some time and address some bugs. Signed-off-by: Tom Duffield <tom@chef.io>
| * Add specs to cover yum_package failure scenariosTom Duffield2017-02-071-0/+18
| | | | | | | | Signed-off-by: Tom Duffield <tom@chef.io>
* | add spec tests on propagating errorsLamont Granquist2017-02-071-0/+29
|/ | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fixed specsnimisha2017-02-021-93/+0
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Rubocop violations in execute resource alternate user implementationadamedx2017-02-022-26/+26
|
* Windows alternate user support for execute resourcesAdam Edwards2017-02-022-6/+141
|
* Raise error if ips_package install returns non-zerotduffield/COOL-464/raise-error-if-install-failsTom Duffield2017-02-011-4/+10
| | | | Signed-off-by: Tom Duffield <tom@chef.io>
* Use CIDR block rather than netmask in route-eth0 fileTom Duffield2017-01-311-1/+7
| | | | | | Convert the netmask into the CIDR block for the route-eth0 file. Signed-off-by: Tom Duffield <tom@chef.io>
* dh/url support cab (#5732)dheerajd-msys2017-01-301-5/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added URL support for cab_package Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com> * specs are added and code refactored Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com> * specs are added and code refactored Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com> * specs are added and code refactored Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com> * specs are added and code refactored Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com> * specs are added and code refactored Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com> * removed bundle/config Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com> * Fixed review comments Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com> * Fixed review comments on #cab_file_source Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com> * comments and context added for #cab_file_source Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* Added module_version attribute for dsc_resource. (#5701)Aliasgar162017-01-231-0/+175
| | | | | | * Added module_version attribute for dsc_resource. Signed-off-by: aliasgar16 <aliasgar.batterywala@msystechnologies.com>
* Do not modify File's new_resource during why-runScott Christopherson2017-01-201-0/+10
| | | | | | | | | | | The `File` provider's `action_create` method would modify the `new_resource` object during a `why-run`. This was problematic when a `File` resource was configured with a `notifies :before` because resources with `before` timers have their actions executed twice. [Once](https://github.com/chef/chef/blob/a2e1d1d4edb74a968b416517fdbdf35740686467/lib/chef/runner.rb#L54-L57) in `why-run` mode to see if the other resources need to be notified, and then executed [once again](https://github.com/chef/chef/blob/a2e1d1d4edb74a968b416517fdbdf35740686467/lib/chef/runner.rb#L68-L69) after the `before` notifications are resolved. This behavior would result in existing File resources not getting their ownership and permissions updated properly during a converge. Signed-off-by: Scott Christopherson <scott@chef.io>
* Merge pull request #5606 from chef/adamleff/warn-on-dangerous-property-namesThom May2017-01-181-2/+2
|\ | | | | Deprecate creating properties whose names are already methods
| * Deprecate creating properties whose names are already methodsadamleff/warn-on-dangerous-property-namesAdam Leff2017-01-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a resource, a user can create a property that is the same name as an already-existing Ruby method, such as `#hash`. In the case of the `#hash` method, this can cause issues when attempting to adding resources to other data structures, such as Arrays or Hashes. In other examples, this could cause unexpected behavior that is incredibly difficult to troubleshoot. This change adds a deprecation warning in the case where a user adds a property to a resource that the resource instance already responds to. If y'all are OK with this approach, I'll be happy to write up the deprecation doc for this for docs.chef.io. Signed-off-by: Adam Leff <adam@leff.co>
* | Merge pull request #5539 from atward/remote_sftp_test_fixThom May2017-01-171-3/+3
|\ \ | | | | | | Correct SFTP remote_file tests
| * | Correct SFTP remote_file testsAdam Ward2016-11-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Incorrectly tested 'ftp' scheme. Fixes: #4750 Obvious fix. Signed-off-by: Adam Ward <adamw@subdesigns.net>
* | | Merge pull request #5313 from ↵Thom May2017-01-171-3/+3
|\ \ \ | | | | | | | | | | | | | | | | juliandunn/aix_candidate_version_blindly_checks_source Don't blindly check source on candidate_version calls.
| * | | Don't blindly check source on candidate_version calls.Julian C. Dunn2016-12-051-3/+3
| | | | | | | | | | | | | | | | Signed-off-by: Julian C. Dunn <jdunn@chef.io>
* | | | Fixed Review Commentsnimisha2017-01-051-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: nimisha <nimisha.sharad@clogeny.com>
* | | | Added specs and fixed existing specsVasu11052016-12-291-19/+19
| | | | | | | | | | | | | | | | Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
* | | | fix dscl group provider func breakageLamont Granquist2016-12-221-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i didn't fully grok the way the dscl providers were written and only half fixed the group dscl provider, but later did a better job fixing the user one. fixes the breakage caught in the dscl group func tests. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | cleanup of ifconfig and route providerslcg/route-ifconfigLamont Granquist2016-12-225-80/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * run_command elimination * shell_out array usage * other misc cleanup Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | user provider cleanupLamont Granquist2016-12-225-109/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * removes more run_command * converts to shell_out_compact * some other misc style cleanup Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | cleanup of group providerlcg/group-provider-cleanupLamont Granquist2016-12-217-73/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - consistent use of shell_out_compact! - remove more uses of run_command - some other code cleanup Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | fix unnecessary quoting of argslcg/deprecate-run-commandLamont Granquist2016-12-201-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | fix groupadd specs and modernizeLamont Granquist2016-12-201-22/+23
| |_|/ |/| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | fix derpage on masterlcg/fix-masterLamont Granquist2016-12-071-1/+1
| | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | Merge pull request #5548 from chef/lcg/chefstyle-updatesThom May2016-12-071-1/+1
|\ \ \ | | | | | | | | Chefstyle updates
| * | | fix style bug pulled in by rebase on masterLamont Granquist2016-12-061-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | | Merge pull request #5562 from stefanor/svn-http-proxyBryan McLellan2016-12-061-0/+9
|\ \ \ \ | | | | | | | | | | Unset http[s]_proxy in the subversion spec
| * | | | Unset http[s]_proxy in the subversion specStefano Rivera2016-11-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So it doesn't alter generated subversion commands. Signed-off-by: Stefano Rivera <stefanor@debian.org>
* | | | | Merge pull request #5613 from spuder/patch-1Bryan McLellan2016-12-061-5/+5
|\ \ \ \ \ | |_|/ / / |/| | | | change choco -version to choco --version
| * | | | Fixes #5256Spencer Owen2016-12-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chocolatey packages with version will give error changes chocolatey tests to use --version instead of -version Signed-off-by: Spencer Owen <owenspencer@gmail.com>
* | | | | Add a spec for supports non_unique throwing a deprecation messageTim Smith2016-12-061-0/+6
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | | | The suggested fix for the manage_home deprecation is incorrectTim Smith2016-12-061-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | manage_home: true is not a proper resource property. It should be manage_home true instead. Signed-off-by: Tim Smith <tsmith@chef.io>
* | | | Merge pull request #5603 from ttr/masterTim Smith2016-12-021-1/+1
|\ \ \ \ | | | | | | | | | | linux mount provider - skip device detection for zfs
| * | | | linux mount spec - skip device detection for zfs (and vboxsf)Tomasz Rudzki (ttr)2016-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Tomasz Rudzki (ttr) <ttr@ttrsite.net>
* | | | | Alias unmount to umount for mount resourceGrant Ridder2016-11-301-0/+7
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows the usage of `action :unmount` to `umount` a mount point Closes https://github.com/chef/chef/issues/5595 Signed-off-by: Grant Ridder <shortdudey123@gmail.com>
* | | | Using shell_out_with_timeout! to throw exception if the command fails.NimishaS2016-11-231-2/+1
|/ / / | | | | | | | | | | | | | | | Hardcoded expand.exe path to avoid hitting gnu expand Signed-off-by: NimishaS <nimisha.sharad@msystechnologies.com>
* | | Merge pull request #5460 from chef/tm/deprecation_with_urlThom May2016-11-162-7/+7
|\ \ \ | | | | | | | | Core: Structure deprecations with additional metadata
| * | | Structure deprecations with additional metadatatm/deprecation_with_urlThom May2016-11-162-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds URLs to each class of deprecation, and correctly prints and formats them for maximum user efficiency. We also provide the URL to the data collector for Visibility to ingest. Signed-off-by: Thom May <thom@chef.io>
* | | | msu_package resource for Microsoft Update packagesNimishaS2016-11-161-0/+284
|/ / / | | | | | | | | | | | | | | | Signed-off-by: NimishaS <nimisha.sharad@msystechnologies.com> Signed-off-by: NimishaS <nimisha.sharad@msystechnologies.com>
* | | 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>
* | Merge pull request #5315 from ↵Bryan McLellan2016-11-111-0/+337
|\ \ | |/ |/| | | | | MsysTechnologiesllc/dh/adding_powershell_package_manager_support Adding support for Powershell package manager to Chef package provider