summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Fix show_progress in remote_file is causing FloatDomainError: InfinityVivek Singh2019-10-021-0/+18
| | | | | | | - Add check to avoid total if zero or nil. - Set @progress[resource] default value to -1 so that it can start with 0%. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Fix Windows Integration and Functional tests for BKjsinha/migrate_appveyorJaymala Sinha2019-10-012-2/+6
| | | | | | | | | * Use default windows 2019 image * Skip 8dot3name tests as default disabled on 2019 * Use windows privileged executor for functional tests * Use windows docker image for chocolatey tests Signed-off-by: Jaymala Sinha <jsinha@chef.io>
* Merge pull request #8894 from atward/backport-dnf-rhel8Tim Smith2019-09-183-5/+15
|\ | | | | dnf_package fixes for RHEL8 backport to chef-14
| * only test these on rhel >= 8 where they workLamont Granquist2019-09-173-5/+15
| | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org> Signed-off-by: Adam Ward <adamw@subdesigns.net>
* | Looks like it's empty rather than nil here.Joshua Justice2019-09-181-2/+2
| | | | | | | | Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
* | Added support to provide additional options to bundle installAmol Shinde2019-09-181-1/+22
|/ | | | | | | - Added option to skip gem metadata installation - Added test cases for gem installer Signed-off-by: Amol Shinde <amol.shinde@msystechnologies.com>
* Add unified_mode switch for resourcesLamont Granquist2019-08-221-0/+876
| | | | | | | | | | | | | | | | | | | | | | | | | | This is inspired by "use_inline_resources". Setting `unified_mode false` in a resource would be the existing behavior with separate compile/converge phases. Setting `unified_mode true` in a resource will eliminate the converge phase. Reverse notifications and delayed notifications will still fire. The resource action will behave like all resources are executing at compile time. As a aside, notifications have never worked for resources firing at compile time. This implementation gets that behavior correct so that notifications will work. Of course forward immediate notifications to resources not yet declared will not be possible. Setting `resource_unified_mode_default true` in `Chef::Config` would turn off the split compile/converge mode for every custom resource. NOTE: This does not affect recipe mode at all. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #8782 from ↵Tim Smith2019-08-131-0/+86
|\ | | | | | | | | MsysTechnologiesllc/VSingh/chef-14/raise-error-bootstrap-chef-15-from-chef-14 Chef-14: Raise an error on Chef 14 when trying to bootstrap Chef 15
| * Raise an error on Chef 14 when trying to bootstrap Chef 15Vivek Singh2019-07-291-0/+86
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | fix zypper_package upgrade provider and unit tests to verifyJeremy Chalfant2019-08-071-0/+9
|/ | | | Signed-off-by: Jeremy Chalfant <jchalfan@us.ibm.com>
* Set permissions on /etc/init.d/inittest to get tests to pass on SLES 11Jeremiah Snapp2019-06-241-0/+1
| | | | | | | Chef::Resource::Service tests were failing on SLES 11 x86_64 and SLES 11 s390x because the permissions weren't correct. Signed-off-by: Jeremiah Snapp <jeremiah@chef.io>
* Raise knife exceptions when verbosity is 3 (-VVV)Bryan McLellan2019-05-301-5/+8
| | | | | | | | | Fixes #8433 When we added trace this check wasn't changed, which means you only saw the stacktrace for 2 (-VV) but not for 3 (-VVV) Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* Merge pull request #8610 from chef/backport_9Tim Smith2019-05-291-20/+123
|\ | | | | Fix for cron resource get confused by environment/property mismatch
| * - Added a warning in case user is using a `environment` for an entry that ↵vijaymmali19902019-05-291-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>
* | Merge pull request #8613 from chef/backport_12Tim Smith2019-05-294-85/+118
|\ \ | |/ |/| Fix for write permissions were not working properly on windows
| * Minor fixes as per the review commentsbackport_12vijaymmali19902019-05-294-99/+105
| | | | | | | | | | | | | | | | | | | | - 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-05-294-16/+43
| | | | | | | | | | | | | | | | - 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-05-291-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>
* | Merge pull request #8611 from chef/backport_10Tim Smith2019-05-291-0/+22
|\ \ | | | | | | Use exports compatibile with /bin/sh in the bootstrap script
| * | Use exports compatibile with /bin/sh in the bootstrap scriptbackport_10markgibbons2019-05-291-0/+22
| |/ | | | | | | | | | | | | | | | | The bootstrap script is explicitly using /bin/sh. On some solaris servers the version of /bin/sh exporting environment variables using "export id=value" fails. The form "id=value export id" does work. Bootstrap fails when the wrong form is used. Signed-off-by: markgibbons <mark.gibbons@nordstrom.com>
* | Merge pull request #8603 from chef/backport_2Tim Smith2019-05-292-0/+50
|\ \ | | | | | | Improving error handling for template render
| * | Improving error handling for template renderGabriel Mazetto2019-05-292-0/+50
| |/ | | | | | | | | | | | | | | | | | | | | | | While Chef already implements a nice amount of information in `TemplateError#to_s`, when using ChefSpec with RSpec, the `#to_s` is not called, leaving us with no source information for template errors. By adding the filename to `Erubis::Eruby` initialization, we can get a better backtrace that will show up in RSpec output. Signed-off-by: Gabriel Mazetto <brodock@gmail.com>
* | Merge pull request #8604 from chef/backport_3Tim Smith2019-05-291-0/+1
|\ \ | | | | | | Tell people what file a link is pointing at.
| * | Tell people what file a link is pointing at.Phil Dibowitz2019-05-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>
* | Fix delete_resource for resourcesArtem Sidorenko2019-05-291-0/+8
|/ | | | | | | | with multiple providers Fixes: https://github.com/chef/chef/issues/6158 Signed-off-by: Artem Sidorenko <artem.sidorenko@t-systems.com>
* Merge pull request #8587 from chef/btm/14-MSYS-976Lamont Granquist2019-05-235-2/+248
|\ | | | | Fix service enable idempotency in sles11 (#8256)
| * Fix service enable idempotency in sles11 (#8256)btm/14-MSYS-976dheerajd-msys2019-05-235-2/+248
| | | | | | | | | | | | * fix service enable idempotency in sles11 Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | Cleanup merge artifactsremove_deprecationsTim Smith2019-05-171-15/+3
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Remove resource collision deprecationsLamont Granquist2019-05-172-53/+20
|/ | | | | | | Switch to only doing warnings. Remove the features in the node_map that we never used. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix for Chef::Exceptions::Win32APIError: The operation completed successfullyKapil Chouhan2019-05-171-0/+25
| | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* Merge pull request #8401 from chef/better_errorsTim Smith2019-04-193-5/+5
|\ | | | | Improve the error message when no config can be loaded
| * Break the error message into 2 sentencesTim Smith2019-04-193-5/+5
| | | | | | | | | | | | We can English Signed-off-by: Tim Smith <tsmith@chef.io>
| * Improve the error message when no config can be loadedTim Smith2019-04-193-5/+5
| | | | | | | | | | | | Make it more clear that we're going to use the CLI options instead since we couldn't find a config file. Signed-off-by: Tim Smith <tsmith@chef.io>
* | fix default/override attribute blacklists and whitelistsLamont Granquist2019-04-191-45/+42
|/ | | | | | | | | | | | | looks like these have been broken for some time, the tests were only testing automatic level (which has no "combined" hash version) and the specs were injecting a plain old hash, so were failing to catch this error on multiple different levels. since the automatic level worked and since mostly people use automatic blacklisting to remove junk from ohai it was very uncommon to hit this bug. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Added Integration Rspecsvijaymmali19902019-04-173-28/+242
| | | | | | | | | - Added specs for data_bag_create_specs - Added specs for data_bag_edit_specs - Added specs for data_bag_show_specs - Ensured chefstyle Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
* Allowing encryption of an unencrypted data bagvijaymmali19902019-04-171-2/+1
| | | | Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
* Don't force DSC functional tests to PS4Bryan McLellan2019-04-121-1/+1
| | | | | | New Windows platforms like 2016 have Powershell 5. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* Avoid accidentally reusing a gid in testsBryan McLellan2019-04-121-2/+15
| | | | | | | Some platforms have groups in odd ranges, make sure the gid we select is not in use. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* Backport fix to chef-14 for #8080Jason Barnett2019-03-151-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #8274 from chef/more_windows_cert_14Tim Smith2019-03-082-0/+75
|\ | | | | windows_certificate: Import nested certificates while importing P7B certs
| * windows_certificate: Import root/nested certificates while importing P7B ↵Nimesh-Msys2019-03-042-0/+75
| | | | | | | | | | | | | | | | | | | | certificates - P7B might contain multiple certificates and we should not miss the internal one while import. - Added test cases and ensured chef-style - Fixes: MSYS-977 Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.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 #8267 from chef/cert_14_moreTim Smith2019-03-042-1/+39
|\ | | | | windows_certificate: Add support to import Base 64 encoded CER certificates
| * Fetching OpenSSL::X509::Certificate object without shell interactions.Nimesh-Msys2019-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | - Previously, we were building a new OpenSSL::X509::Certificate object with PEM string contents. - To get this content, we were using openssl utility and were converting all certificate types into PEM - And were extracting the PEM contents out of resulting data. - It could directly be done via correct usage of applicable classes. - Reverted using Open3. It uses shell hence did not solved the purpose. Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
| * Windows Certificate: Add support to import Base 64 encoded CER certificatesNimesh-Msys2019-03-042-0/+38
| | | | | | | | | | | | | | | | | | | | - Till now, cer certificates were only considered to be in binary format (DER) - They can also be base-64 encoded(PEM) - We should only append "inform DER" only if it is a binary certificate, otherwise, default ("inform PEM") would support base64 encoded certificates. - Added test caes - Ensured Chef style Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* | Merge pull request #8264 from chef/openssl_14Tim Smith2019-03-041-0/+5
|\ \ | | | | | | openssl_dhparam: allow changing file mode on subsequent runs
| * | chefstyle fixdheerajd-msys2019-03-041-1/+1
| | | | | | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
| * | test case addeddheerajd-msys2019-03-041-0/+5
| |/ | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | chocolatey_package private source specVivek Singh2019-03-041-0/+29
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Authentication on chocolatey_packageVivek Singh2019-03-041-1/+1
|/ | | | | | | - Add missing options cmd args while fetching choco list. - Fixed rspec. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>