summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Add unified_mode switch for resourcesLamont Granquist2019-08-121-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 #8795 from ↵Tim Smith2019-08-071-8/+13
|\ | | | | | | | | MsysTechnologiesllc/VSingh/temp-dir-using-mkdir-instead-of-mktemp Chef-15: Make temp dir using mkdir instead of mktemp
| * Fix chown: Operation not permittedVivek Singh2019-08-071-2/+2
| | | | | | | | | | | | - Added sudo chown to fix permission denied error. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * Make temp dir using mkdir instead of mktempVivek Singh2019-08-061-8/+13
| | | | | | | | | | | | - mktemp does not exist for AIX system. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Merge pull request #8772 from ↵Tim Smith2019-08-071-0/+5
|\ \ | | | | | | | | | | | | MsysTechnologiesllc/dh/MSYS-1057_fix_knife_node_environment fix knife node environment set output
| * | fix to avoid conflicts with pattern of other datadheerajd-msys2019-08-061-0/+5
| |/ | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* | Merge pull request #8794 from ↵Tim Smith2019-08-071-0/+6
|\ \ | | | | | | | | | | | | chef/Kapil/MSYS-1065_rhsm_repo_disable_does_not_support_wildcard Fix for rhsm_repo disable does not support wildcard
| * | Fix for rhsm_repo disable does not support wildcardKapil/MSYS-1065_rhsm_repo_disable_does_not_support_wildcardKapil chouhan2019-08-061-0/+6
| |/ | | | | | | Signed-off-by: Kapil chouhan <kapil.chouhan@msystechnologies.com>
* | zypper_package upgrade action not working (#8462)Lamont Granquist2019-08-071-0/+9
|\ \ | |/ |/| zypper_package upgrade action not working
| * fix zypper_package upgrade provider and unit tests to verifyJeremy Chalfant2019-06-131-0/+9
| | | | | | | | Signed-off-by: Jeremy Chalfant <jchalfan@us.ibm.com>
* | and don't forget to fix the test i just added...lcg/data-collector-exception-handlingLamont Granquist2019-07-241-1/+1
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Tweak data collector exception handlingLamont Granquist2019-07-241-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't Java and Net::HTTP can throw a billion things, so just rescue (nearly) everything. I have a hard time imagining that there's a failure here that we wouldn't want to ignore, other than the ones like OOM thrown by Exception that indicate internal failures. Also only throw the "this is normal" info message on 404s, other responses like 500s should be warns even if it is set to ignore failures (people with data collectors correctly setup need to know about 500s even if we keep going, since that is abnormal). This also fixes a bug in handling exceptions like Timeout::Error which do not have a response.code at all which would throw NoMethodError. closes #8749 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Duration field in resource report needs to be Stringlcg/resource_reporter_duration_bugfixLamont Granquist2019-07-231-0/+2
| | | | | | | | | | | | | | | | | | | | Somehow this got converted to a bare integer in Chef-15 refactoring which causes the server-side to reject it, so reverting back to the old format. Closes #8532 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge pull request #8747 from tomdoherty/lkm_disableTim Smith2019-07-191-0/+1
|\ \ | | | | | | Implement disable for disabling kernel_modules
| * | Implement disable for disabling kernel_modulesTom Doherty2019-07-171-0/+1
| | | | | | | | | | | | | | | | | | This allows inspec kernel_module be_disabled to work Signed-off-by: Tom Doherty <tom.doherty@fixnetix.com>
* | | only test these on rhel >= 8 where they worklcg/fix-dnf-rhel8Lamont Granquist2019-07-193-5/+15
|/ / | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Remove rspec config for TravistravisTim Smith2019-07-093-5/+4
| | | | | | | | | | | | We're running this all in buildkite w/o issues. Signed-off-by: Tim Smith <tsmith@chef.io>
* | fix multiline stringLamont Granquist2019-07-081-9/+9
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Style/NegatedUnlessLamont Granquist2019-07-081-1/+1
| | | | | | | | | | | | found one. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | lazy procs are instance_exec in the resource alreadyLamont Granquist2019-07-051-1/+1
| | | | | | | | | | | | | | | | exposed by Style/SymbolProc mangling some bad code. no idea how this ever worked. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fix 4 copsLamont Granquist2019-07-0547-170/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-0521-67/+35
| | | | | | | | | | | | enforce pretzels. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Style/StringLiteralsInInterpolationLamont Granquist2019-07-0541-211/+211
| | | | | | | | | | | | since we use double quotes, be consistent everywhere. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Style/ClassCheckLamont Granquist2019-07-057-15/+15
| | | | | | | | | | | | convert kind_of? to is_a? Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Style/RegexpLiteralLamont Granquist2019-07-0522-95/+95
| | | | | | | | | | | | | | 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-0511-17/+17
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Style/EmptyLiteralLamont Granquist2019-07-0544-89/+89
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fix more Style/SymbolArray autocorrect bugsLamont Granquist2019-07-022-5/+5
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Style/EmptyMethodLamont Granquist2019-07-0212-42/+21
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | tweak Lint/BlockAlignmentLamont Granquist2019-07-027-66/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Layout/MultilineMethodCallIndentationLamont Granquist2019-07-024-152/+152
| | | | | | | | | | | | | | | | Layout/MultilineMethodCallIndentation: Enabled: true EnforcedStyle: indented Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Style/MethodCallWithoutArgsParenthesesLamont Granquist2019-07-0263-192/+192
| | | | | | | | | | | | | | | | 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-0246-205/+205
| | | | | | | | | | | | start enforcing using %i{} instead of arrays of symbols Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fix Layout/EmptyLineAfterGuardClauseLamont Granquist2019-07-0210-0/+17
| | | | | | | | | | | | | | 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>
* | fix Layout/AlignArgumentslcg/new-chefstyleLamont Granquist2019-07-0228-152/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | this is using: Layout/AlignArguments: Enabled: true EnforcedStyle: with_fixed_indentation the default style can use really excessive whitespace. on starting lines which are already long, it fully indents across to where the arguments start and then begins the line there. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fixes for chefstyle bumpLamont Granquist2019-07-0214-61/+61
| | | | | | | | | | | | | | | | result of automation https://github.com/chef/chefstyle/pull/72 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Parse day param value into stringVivek Singh2019-07-021-1/+6
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Merge pull request #8635 from gep13/choco_sourceTim Smith2019-06-251-1/+54
|\ \ | | | | | | (GH-8634) Add ability to further configure source
| * | Address PR review feedbackGary Ewan Park2019-06-051-6/+6
| | | | | | | | | | | | Signed-off-by: Gary Ewan Park <gep13@gep13.co.uk>
| * | (GH-8634) Add ability to further configure sourceGary Ewan Park2019-06-041-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | This provides the ability to set additional properties for a Chocolatey source with properties `admin_only` and `allow_self_service`. As well as the ability to enable/disable a source. Signed-off-by: Gary Ewan Park <gep13@gep13.co.uk>
* | | Merge pull request #8682 from higanworks/handle_temp_dir_stdoutTim Smith2019-06-251-0/+9
|\ \ \ | | | | | | | | Ignore noisy outputs at create temp_dir during bootstrap
| * | | ignore noise outputssawanoboly2019-06-241-0/+9
| | | | | | | | | | | | | | | | Signed-off-by: sawanoboly <sawanoboriyu@higanworks.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>
* | | Move the data collector should_be_enabled? checklcg/move-dc-checkLamont Granquist2019-06-181-17/+17
| |/ |/| | | | | | | | | | | This works better as part of the module that handles all the config wrangling. It isn't central to the data_collector operation itself. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | use mixlib-cli's deprecation mechanismMarc A. Paradise2019-06-101-101/+0
| | | | | | | | | | | | | | | | Deprecation logic is now available in `mixlib-cli` via `deprecated_option`. Let's use that instead of keeping our custom deprecation behavior. Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
* | Merge pull request #8627 from chef/jsinha/add_bk_verifyTim Smith2019-06-061-1/+1
|\ \ | | | | | | Enable more BK verification tests
| * | Enable All BK verification testsJaymala Sinha2019-06-041-1/+1
| | | | | | | | | | | | Signed-off-by: Jaymala Sinha <jsinha@chef.io>
* | | Chef-15: Adding short argument's deprecation check (#8626)Nimesh2019-06-051-11/+79
| |/ |/| | | | | | | | | | | | | | | - Handles "-x" that was used to set "winrm-user" and is now Deprecated. - Using symmetrical "USERNAME" and "PASSWORD" verbiages while displaying deprecated warnings. - Added test cases - Ensured Chefstyle - Fixes MSYS-1046 Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* | Merge pull request #8630 from cc-build/dist_shellTim Smith2019-06-041-1/+1
|\ \ | | | | | | more distro constants
| * | more distro constantsMarc Chamberland2019-06-031-1/+1
| |/ | | | | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>