summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* add timeout propertymsu_15dheerajd-msys2020-06-232-0/+6
| | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* update specdheerajd-msys2020-06-231-2/+3
| | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* Fix rspec warning about `not_to raise_error` with a specific exception.Pete Higgins2020-06-238-39/+39
| | | | | | WARNING: Using `expect { }.not_to raise_error(SpecificErrorClass)` risks false positives, since literally any other error would cause the expectation to pass, including those raised by Ruby (e.g. NoMethodError, NameError and ArgumentError), meaning the code you are intending to test may not even get reached. Instead consider using `expect { }.not_to raise_error` or `expect { }.to raise_error(DifferentSpecificErrorClass)`. This message can be suppressed by setting: `RSpec::Expectations.configuration.on_potential_false_positives = :nothing`. Called from /Users/pete/work/chef/spec/unit/resource_spec.rb:381:in `block (4 levels) in <top (required)>'. Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Chefstyle fixTim Smith2020-06-231-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix wrong unit test exposed by cleaning up rspec deprecations.Pete Higgins2020-06-231-9/+1
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Bring in spec fix from 65b52caf20fe608eaf2a0975ed09539c5ba0d4c4Tim Smith2020-06-231-1/+1
| | | | | | We don't want / need the whole commit, but we need this Signed-off-by: Tim Smith <tsmith@chef.io>
* Silence exception output in threaded test.Pete Higgins2020-06-231-0/+9
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Merge pull request #10041 from chef/validatorless_bootstrap_15Tim Smith2020-06-231-2/+2
|\ | | | | Warn during bootstrapping when using validation keys
| * Warn during bootstrapping when using validation keysTim Smith2020-06-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | We should highly encourage users to move to validatorless bootstrapping 1) It's more secure 2) It requires less admin work since there no validation key to pass around or rotate This also provides an improved message helping the user to move off the old keys and fixes some bad formatting where the 2nd line was indented about 40 columns. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Updated exception messagesnehaldwivedi2020-06-231-1/+1
| | | | | | | | Signed-off-by: snehaldwivedi <sdwivedi@msystechnologies.com>
* | Updated exception message Chef::Exceptions::InvalidDataBagPathsnehaldwivedi2020-06-231-1/+1
|/ | | | Signed-off-by: snehaldwivedi <sdwivedi@msystechnologies.com>
* archive_file: better handle mode property and deprecate Integer valuesTim Smith2020-06-231-2/+11
| | | | | | | | | | | | | | | | FileUtils.mkdir_p expects the mode to be in octal form. We accept Integers, but Ruby doesn't have a way to tell if what the user passed was octal or not. The safest thing to do here is to only accept mode as a String and then convert it to octal form with .to_i(8). This adds a new deprecation and correctly sets the file mode value as octal. Right now this feature works like this: String mode: applies wrong permission Base 10 mode: applies wrong permissions Octal mode: Works New behavior: String mode: Works Base 10 mode: Works but throws a deprecation warning Octal mode: applies the wrong permissions and throws a deprecation warning Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #10030 from chef/zypper_15Tim Smith2020-06-231-25/+75
|\ | | | | Fix zypper_repository key handling on SLES 15+
| * Fix a spec failure due to the rebaseTim Smith2020-06-231-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add specs and rename fingerprint -> short idTim Smith2020-06-231-24/+74
| | | | | | | | | | | | | | | | These aren't actually fingerprints. They're short key ids https://futureboy.us/pgp.html#ShortKeyID Signed-off-by: Tim Smith <tsmith@chef.io>
* | Fix spec that was missed in the rebaseTim Smith2020-06-231-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Fixed Powershell_Package does not throw error when it cannot connect to ↵sanga172020-06-231-85/+94
|/ | | | | | powershell gallery Signed-off-by: sanga17 <sausekar@msystechnologies.com>
* Fix how enforce_license is set in run method for chef-applyLance Albertson2020-06-171-0/+7
| | | | | | | | | | | | | | | I recently discovered that when using Chef::Application::Apply.new.run(enforce_license: false), chef-apply will still run the license verification when I expected it to be disabled. It seems this feature works if you install this as a gem, however if you build chef using omnibus with this set, it refuses to work. I suspect this might be something with appbundler. I noticed that other binaries (i.e. solo) were using "run(enforce_license: false)" instead of "run(enforce_license = false)" which chef-apply uses. If I changed this to "run(enforce_license: false)", this worked as expected. Signed-off-by: Lance Albertson <lance@osuosl.org>
* Use lamonts set of pathsTim Smith2020-05-301-6/+5
| | | | | | I confirmed these work with chefdk Signed-off-by: Tim Smith <tsmith@chef.io>
* Revert the change to the load paths in the specsrevert_pathsTim Smith2020-05-291-4/+6
| | | | | | | | | | | This reverts commit de8d3a3299a18d4bfd2b419cb1303258441a862a. This code works fine within Workstation, but it fails hard with DK. We need to keep the DK verify checks running with Chef 15 until both of these codebases go away. For now just revert this and roll forward with life in master where we have the new paths Signed-off-by: Tim Smith <tsmith@chef.io>
* Pull in spec task / helper from masterTim Smith2020-05-298-7/+22
| | | | | | We've changed up some things Signed-off-by: Tim Smith <tsmith@chef.io>
* Avoid some constant warnings in specsTim Smith2020-05-292-4/+4
| | | | | | We've already done this on master Signed-off-by: Tim Smith <tsmith@chef.io>
* fix windows bootstrap; replicate https://github.com/chef/chef/pull/9839 by ↵Marc Chamberland2020-05-221-0/+6
| | | | | | | | | Chad Jessup This fixes bootstrapping on Windows. All credit goes to Chad Jessup <chad.jessup@gmail.com> but since the original PR was left without DCO I'm replicating it here, with valid DCO. Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com>
* Fix chefstyle warnings (spacing on comments)Tim Smith2020-05-2119-66/+66
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove simplecov for testing as we already did in chef 16Tim Smith2020-05-211-11/+0
| | | | | | We're not using this Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #9797 from chef/lcg/chef-15-knife-backportLamont Granquist2020-05-071-13/+10
|\
| * Chef 15 backport of Chef 16 knife cleanupLamont Granquist2020-05-071-13/+10
| | | | | | | | | | | | | | Backport of some of #9646 to make it so Chef-16 style knife plugins can run on Chef-15. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Fix for Chocolate_resource options causing extra quotesKapil Chouhan2020-05-062-1/+30
|/ | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* Simplify the logic since we know when 15 goes EOLdeprecation_warning_chef_15Tim Smith2020-04-151-4/+2
| | | | | | | There's no need to calculate it here since this code will only ever run on 15 Signed-off-by: Tim Smith <tsmith@chef.io>
* Simplify the logic + improve the specTim Smith2020-04-151-3/+3
| | | | | | | Use 2006 as the base year. Chef 15 goes EOL next year on 5-1-2021 so 2006 + 15 = 2021 and then we know it. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add a spec for the EOL warningsTim Smith2020-04-151-0/+16
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Chef-15: Remove copyright dateslcg/remove-copyright-dates-chef-15Lamont Granquist2020-04-13644-645/+645
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix specbootstrap_version_fixLamont Granquist2020-04-101-2/+2
| | | | | | | the bootstrap context isn't responsible for merging so this was always testing the wrong behavior Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add more typo fixesVivek Singh2020-04-0812-55/+55
| | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* some spec typosVivek Singh2020-04-0842-57/+57
| | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Really skip the reboot pending func test if a reboot is pendingBryan McLellan2020-04-061-5/+6
| | | | | | This looks like it never worked but we happened to never run into it until we added a desktop platform to the pipeline. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* Fix failing specsTim Smith2020-04-021-2/+2
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Handle scenario where no value found in the updateTim Smith2020-04-021-1/+31
| | | | | | Also add a pile of specs Signed-off-by: Tim Smith <tsmith@chef.io>
* Add testing of the xcode CLI detection plist parsingTim Smith2020-04-023-11/+133
| | | | | | Use the data files from the macos cookbook Signed-off-by: Tim Smith <tsmith@chef.io>
* Switch the array format of shell_out and add a testTim Smith2020-04-021-1/+25
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix functional tests on Windows 10 by matching lessBryan McLellan2020-04-021-4/+4
| | | | | | | | | | | | Windows 10 1909 is a service pack, but without being called a service pack. 1909 is a very small update over 1903, and in fact most of the binaries are not rebuilt. The version for 1909 is 10.0.18363, but the version in many files is still 10.0.18362, which was the version for 1903. This caused this functional test to fail on 1909 because 10.0.18362 != 10.0.18363. Nowhere else are we concerned with the file versions matching the OS version, so the fix is to match less of the version. By matching only '10.0', we should not see this again. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* Merge pull request #9556 from chef/windows_share_fix_15Tim Smith2020-03-311-1/+3
|\ | | | | Fixed windows share cannot modify frozen string bug
| * Required specs updatedsanga172020-03-311-3/+1
| | | | | | | | Signed-off-by: sanga17 <sausekar@msystechnologies.com>
| * Specs added for freezed string and cloned stringsanga172020-03-311-0/+4
| | | | | | | | Signed-off-by: sanga17 <sausekar@msystechnologies.com>
* | Merge pull request #9555 from chef/net-tools-15Tim Smith2020-03-313-3/+9
|\ \ | | | | | | Skip the ifconfig functional tests if we don't have ifconfig
| * | Skip the ifconfig functional tests if we don't have ifconfigTim Smith2020-03-313-3/+9
| |/ | | | | | | | | | | I'm looking at you Ubuntu 20.04 Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #9554 from chef/docs_linksTim Smith2020-03-314-7/+7
|\ \ | | | | | | Update all our links to use the new docs site format / cleanup descriptions
| * | Make the links end with /Tim Smith2020-03-313-4/+4
| | | | | | | | | | | | | | | | | | Thanks for pointing this out Ian Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Update all our links to use the new docs site formatTim Smith2020-03-313-6/+6
| |/ | | | | | | | | | | When we migrated to hugo the URLs changed a bit. Nothing ends in .html and we moved all the resources into their own dir. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Switch to RUBY_PLATFORM for the windows checkTim Smith2020-03-311-1/+1
|/ | | | | | Merging in this check broke the build tests on Windows hosts. Signed-off-by: Tim Smith <tsmith@chef.io>