summaryrefslogtreecommitdiff
path: root/spec/functional
Commit message (Collapse)AuthorAgeFilesLines
* add a label to the shell specscsnapp/9282Christopher A. Snapp2020-07-131-5/+5
| | | | | | | | These fail in the Habitat plan verification tests because bundle isn't on the PATH in the same way as previously discovered in the version specs in commit 3f2d235ac75. Signed-off-by: Christopher A. Snapp <csnapp@chef.io>
* Merge pull request #9998 from plexinc/fix_git_resourceLamont Granquist2020-07-101-0/+22
|\
| * Don't try a git branch -f if already on the same branchMatthieu Serrepuy2020-07-101-0/+22
| | | | | | | | Signed-off-by: Matthieu Serrepuy <lotooo@gmail.com>
* | Update functional specssshTim Smith2020-07-081-4/+4
|/ | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add spaces after attrsTim Smith2020-07-071-0/+1
| | | | | | This makes it easier to read the classes. Signed-off-by: Tim Smith <tsmith@chef.io>
* feed chefstylelcg/fix-syslogLamont Granquist2020-07-021-1/+0
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Replace stub run_context with one with more platform information.Pete Higgins2020-06-302-2/+13
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Remove a stub run_context.Pete Higgins2020-06-301-2/+0
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Use the original run_context for tests that depend on platform specific stuff.fix-release-build-testsPete Higgins2020-06-303-3/+28
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Fix more undefined references to run_context.Pete Higgins2020-06-303-0/+6
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Don't use stubbed node.Pete Higgins2020-06-301-6/+2
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Fix a missing reference to run_context.Pete Higgins2020-06-301-3/+4
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* This spec seems to rely on the existing run_context behavior.Pete Higgins2020-06-261-2/+9
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Remove test file that added a method to top-level scope.Pete Higgins2020-06-2625-49/+44
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Fix some odd whitespacing in tests.Pete Higgins2020-06-246-14/+14
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Merge pull request #10001 from chef/cron_cleanupTim Smith2020-06-151-0/+10
|\ | | | | Cron and Cron_d resource weekday property fixes
| * Added freeze for WEEKDAYS constant.antima-gupta2020-06-101-4/+4
| | | | | | | | | | | | | | Fixed chefstyle spec failure. Made changes as per review comment. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
| * Fixed cron resource weekday property.antima-gupta2020-06-101-0/+10
| | | | | | | | | | | | | | | | | | Implemented same weekday functionality for cron_d resource. Fixed rspec failure. Added cron helper for weekday functionality Added spec for cron helper. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* | Use .match? not =~ when match values aren't necessaryTim Smith2020-06-111-2/+2
|/ | | | | | 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 rspec warning about `not_to raise_error` with a specific exception.fix-rspec-warningPete Higgins2020-05-291-8/+8
| | | | | | 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>
* fix dnf testslcg/fix-dnf-testsLamont Granquist2020-05-211-2/+2
| | | | | | | looks like the syntax for equality pinning to a version changed in fedora 31 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Get lib/ free of spelling violations.Pete Higgins2020-05-182-10/+10
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* fixing testsLamont Granquist2020-05-131-56/+75
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fixes and tests for Chef-16 regression in launchdLamont Granquist2020-05-131-0/+213
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Align all our comments with the codeTim Smith2020-05-062-2/+2
| | | | | | 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>
* OS X -> macOSTim Smith2020-04-301-3/+3
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix more ruby 2.7 warning logspamlcg/more-ruby-27-logging-suppressionLamont Granquist2020-04-281-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove git func test for upstreamLamont Granquist2020-04-271-6/+0
| | | | | | | | | | | The output of this command seems to vary too much over different git versions to make it reliable and actually work. We should find something here that works, but determining what git commands to use which are stable for parsing can be very difficult. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Disable the windows_exec test for nowTim Smith2020-04-271-10/+11
| | | | | | | | This is breaking habitat and 32bit windows builds for now. It is 100% an issue, but it's always been an issue. For now we need a build and we'll track down those larger issues in future builds. Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #9648 from ↵Tim Smith2020-04-251-2/+12
|\ | | | | | | | | chef/Kapil/GitHub-9450_Update_the_locale_resource_to_support_Windows locale: Support setting locale on Windows
| * Update the locale resource to support WindowsKapil/GitHub-9450_Update_the_locale_resource_to_support_WindowsKapil Chouhan2020-04-221-2/+12
| | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* | Merge pull request #9726 from chef/lcg/chef-16-gitTim Smith2020-04-231-134/+190
|\ \ | | | | | | Refactor scm, git and subversion resources & fix longstanding git issues
| * | remove upstream test of deploy branchLamont Granquist2020-04-231-6/+1
| | | | | | | | | | | | | | | | | | | | | git isn't back consistent results for this API, i'm not sure what the correct stable API is to get this info from git. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * | Chef-16 git provider fixesLamont Granquist2020-04-231-134/+195
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix for Chocolate_resource options causing extra quotesKapil/Github-9413_Chocolate_resource_options_causing_extra_quotesKapil Chouhan2020-04-231-0/+29
|/ | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* Merge pull request #9646 from chef/lcg/bootstrap-options-cleanupTim Smith2020-04-171-19/+23
|\ | | | | Knife bootstrap options cleanup
| * Knife bootstrap options cleanupLamont Granquist2020-04-171-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have issue that are caused by old code before merging of hash values were done correctly. The `config` hash correctly merges all options and should always be used. Knife plugins should never touch Chef::Config[:knife] values (either reading or writing from them). The `knife_config` should be converted to the `config` hash since it directly accesses Chef::Config[:knife] values. The `config_value()` helper should no longer be used. Very clearly most people started to use that when they should just use the config hash directly. That was intended to be used only when a knife cli option was being renamed and the former configuration value needed to be used as well. It has been cargo culted around as the way to access config values, and that should really stop. The DataBagSecretOption mixin has been cleaned up so that the cli options read+write only to the config[:cl_secret] and config[:cl_secret_file] values. The config file values go into config[:secret] and config[:secret_file]. The fact that those are the merged values in the `config` hash doesn't matter since only the cli should be writing to the first two and only the config file should be writing to the latter two. I don't know why it was made so complicated to begin with, but if there's some hidden chef-11.early backcompat there, then chef-16 deliberately breaks that. The use of `locate_config_value` helpers in all knife plugins is also discouraged (but they all implement those themselves), just use the config hash, which has the correct hash merge ordering. All of those need to be deleted. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | add timeout propertydheerajd-msys2020-04-141-0/+2
| | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | update specdheerajd-msys2020-04-141-2/+3
|/ | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-1376-76/+76
| | | | | | | | 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>
* update filter for opensuse and fix depsdheerajd-msys2020-04-131-1/+1
| | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* update test for opensusedheerajd-msys2020-04-132-7/+214
| | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* remove support for SLES11dheerajd-msys2020-04-131-206/+0
| | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* Merge pull request #9609 from MsysTechnologiesllc/VSingh/typos-fixesTim Smith2020-04-076-40/+40
|\ | | | | Spell checking in comments and log messages
| * Add more typo fixesVivek Singh2020-04-073-34/+34
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * some spec typosVivek Singh2020-04-074-6/+6
| | | | | | | | 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 functional tests on Windows 10 by matching lessBryan McLellan2020-03-311-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>
* Skip the ifconfig functional tests if we don't have ifconfignet-toolsTim Smith2020-03-271-2/+2
| | | | | | I'm looking at you Ubuntu 20.04 Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove a functional test that was already well cover in unit testsTim Smith2020-03-231-7/+0
| | | | | | This is really unit test land Signed-off-by: Tim Smith <tsmith@chef.io>