summaryrefslogtreecommitdiff
path: root/spec/support
Commit message (Collapse)AuthorAgeFilesLines
* Use .match? not =~ when match values aren't necessaryTim Smith2020-06-113-3/+3
| | | | | | Autocorrected from RuboCop Performance which is now smart enough to detect when you use the match and when you don't. Using match? does not create any objects so it's slightly faster and uses less memory. Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix a test to avoid rspec warning.Pete Higgins2020-06-101-1/+1
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Update our usage of OpenSSL::Digest to avoid Ruby 3 breaking changeopenssl_fixesTim Smith2020-05-221-1/+1
| | | | | | There's a RuboCop cop to fix these before Ruby 3 breaks it. Signed-off-by: Tim Smith <tsmith@chef.io>
* Replace nonsense word with other silly words.Pete Higgins2020-05-181-4/+4
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Fix ruby 2.7 keyword argument warnings.Pete Higgins2020-05-181-1/+1
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Align all our comments with the codeTim Smith2020-05-061-1/+1
| | | | | | Autocorrected with chefstyle after enabling that cop. It was very hard to read some complex autocorrected blocks w/o this. Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove an unused spec helperTim Smith2020-04-301-13/+0
| | | | | | The code this was used with is long gone Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix more ruby 2.7 warning logspamlcg/more-ruby-27-logging-suppressionLamont Granquist2020-04-282-3/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-16 git provider fixesLamont Granquist2020-04-231-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | The git provider now no longer checks out to a "deploy" branch by default and now checks out to the branch (with a remote upstream) or else checks out to a detatched head. The prior behavior can be restored by using "checkout branch 'deploy'". This also removes the SCM resource base class and replaces it with a resource partial and does some internal reorganization. It also introduces the RecipeDSLHelper for better functional tests and cleans up the functional tests of the git provider. Properties that were only ever implemented on the git provider were removed from the subversion provider where they had been inherited from the base class incorrectly. Some additional env var handling was added to the subversion handler in the process of sorting out the common properties, including HOME handling for alternative users. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-1338-38/+38
| | | | | | | | Legally incredibly dubious, particularly since we don't follow it strictly as policy, and we have git history instead, which does it right. This is just a waste of time and a cargo cult. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* make dep update fasterdheerajd-msys2020-04-131-1/+2
| | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* update filter for opensuse and fix depsdheerajd-msys2020-04-131-2/+2
| | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* update test for opensusedheerajd-msys2020-04-131-2/+5
| | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* remove support for SLES11dheerajd-msys2020-04-131-4/+0
| | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* some spec typosVivek Singh2020-04-074-4/+4
| | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Implement eager_load_libraries metadata optionLamont Granquist2020-04-031-7/+10
| | | | | | | | This implements RFC-40 from the old chef rfc repo: https://github.com/chef-boneyard/chef-rfc/blob/master/rfc040-on-demand-cookbook-libraries.md Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Skip the ifconfig functional tests if we don't have ifconfignet-toolsTim Smith2020-03-271-0/+4
| | | | | | I'm looking at you Ubuntu 20.04 Signed-off-by: Tim Smith <tsmith@chef.io>
* Switch to RUBY_PLATFORM for the windows checkfix_windows_buildsTim Smith2020-03-241-1/+1
| | | | | | Merging in this check broke the build tests on Windows hosts. Signed-off-by: Tim Smith <tsmith@chef.io>
* Revert "CONTROVERSIAL: remove "with a chef repo" shared context."Tim Smith2020-03-161-0/+31
| | | | This reverts commit 88c07f9d240d90efe269a776f698c6b7ce47e067.
* CONTROVERSIAL: remove "with a chef repo" shared context.Ryan Davis2020-03-161-31/+0
| | | | | | | | | | | | | It's provided by cheffish, but with one difference (force). Unfortunately, that force can't be pushed to cheffish as-is because it relies on ChefUtils.windows?. This could be changed to something else... A global for all I care. But, we might not want to push this commit yet. I just can't stand the noise in the test output as I try to clean this stuff up. Signed-off-by: Ryan Davis <zenspider@chef.io>
* Fix all(?) circular requires coming from the specs.Ryan Davis2020-03-167-13/+0
| | | | | | | Lots more in lib, but that's out of scope for this. I'm just trying to make it easier to debug a failing spec when needed. Signed-off-by: Ryan Davis <zenspider@chef.io>
* Guard against windows loading on non-windows platforms.Ryan Davis2020-03-161-25/+27
| | | | Signed-off-by: Ryan Davis <zenspider@chef.io>
* Remove warnings on test runsRyan Davis2020-03-161-2/+2
| | | | | | | 1. Bundler.with_clean_env is deprecated. Switched to with_unbundled_env. 2. When we test for win32/daemon existance, redir to dev/null. Signed-off-by: Ryan Davis <zenspider@chef.io>
* Remove the canonical DSLLamont Granquist2020-03-031-1/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove constraints on specsnuke_old_specsTim Smith2020-02-281-2/+2
| | | | | | Run it all. Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove all the code that checks for Windows Nanonano_supportTim Smith2020-02-282-20/+2
| | | | | | Windows Nano isn't a thing anymore so we shouldn't spending compute time checking to see if we're on Windows Nano Signed-off-by: Tim Smith <tsmith@chef.io>
* Chefstyle fixes identified with Rubocop 0.80Tim Smith2020-02-181-3/+3
| | | | | | The new Rubocop detects more unnecessary returns. This fixes these ahead of time so we can roll out the new Rubocop engine without breaking builds later. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add output for the file provider verification (#9039)Lamont Granquist2019-12-091-4/+16
|\ | | | | Add output for the file provider verification
| * Fix undefined method `dirname' for Chef::Provider::File:Classlcg/file-verifier-outputVivek Singh2019-12-021-4/+16
| | | | | | | | | | | | | |  - Fix failing specs.  - Fix long strings getting truncated for RSpec expectations. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Removed method for defining return codes, changed to evaluate stderr on exit ↵skippy2019-11-191-15/+14
| | | | | | | | | | | | code 12 Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
* | Resolved all chefstyle failuresskippy2019-11-171-14/+14
| | | | | | | | Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
* | re-un-inverted my previous 3am coding adventure in double negativesskippy2019-11-171-3/+3
| | | | | | | | Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
* | Resolved failing tests, fixed inverted logicskippy2019-11-171-12/+21
| | | | | | | | Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
* | Resolved issues with tests not receiving exactly what they expected.skippy2019-11-171-5/+5
|/ | | | | | Resolved new method in linux_user not returning the correct array. Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
* Add chef-utils gem with various recipe DSL helpersLamont Granquist2019-11-086-8/+10
| | | | | | | | | | | | | This is the implementation of [RFC-087](https://github.com/chef-boneyard/chef-rfc/blob/master/rfc087-distro-sugar-helpers.md) although some of the specifics have been iterated on and changed. The documentation will be in the [README.md](https://github.com/chef/chef/tree/master/chef-utils/README.md) once this is merged. While this PR mostly moves chef-sugar utilities into core-chef via this chef-utils gem, the scope of the chef-utils gem should be considered larger than just that. As an example this PR moves the Mash class into this gem for reuse in ohai as well. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #8775 from chef/ryancragun/mac_userTim Smith2019-09-091-0/+10
|\ | | | | Add mac_user resource that is compatible with macOS >= 10.14
| * add functional testryancragun/mac_userRyan Cragun2019-09-031-0/+10
| | | | | | | | Signed-off-by: Ryan Cragun <ryan@chef.io>
* | remove app_server_support spec filelcg/remove-support-specLamont Granquist2019-08-282-41/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert to using TinyServer and remove the duplicated functionality with the "app_server_support" helper. The fact that this change hits the knife raw / knife redirection specs that have so many timeout issues is very likely not a coincidence. I would bet a small, but not entirely insignificant amount of money that this makes those timeout issues go away. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | only test these on rhel >= 8 where they worklcg/fix-dnf-rhel8Lamont Granquist2019-07-191-0/+8
|/ | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix 4 copsLamont Granquist2019-07-054-30/+30
| | | | | | | | | | | | | | - 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>
* Style/SymbolProcLamont Granquist2019-07-053-37/+13
| | | | | | enforce pretzels. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/StringLiteralsInInterpolationLamont Granquist2019-07-055-7/+7
| | | | | | since we use double quotes, be consistent everywhere. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/RegexpLiteralLamont Granquist2019-07-051-1/+1
| | | | | | | given how many regexps we have with /'s in the match this seems like a very good one. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/NegatedIfLamont Granquist2019-07-055-8/+8
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/EmptyLiteralLamont Granquist2019-07-052-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/EmptyMethodLamont Granquist2019-07-021-8/+4
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* tweak Lint/BlockAlignmentLamont Granquist2019-07-021-2/+2
| | | | | | | | | | | | | | | 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>
* Style/MethodCallWithoutArgsParenthesesLamont Granquist2019-07-021-1/+1
| | | | | | | | zero args methods don't get parens. this certainly reads better than the inverse. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/SymbolArrayLamont Granquist2019-07-024-14/+14
| | | | | | start enforcing using %i{} instead of arrays of symbols Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/EmptyLineAfterGuardClauseLamont Granquist2019-07-023-0/+8
| | | | | | | i like this one, gives visual priority to returns or raises that are buried in the middle of things. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>