summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* provide powershell_exec functionality on x86ps_exec_x86mwrock2020-10-091-1/+1
| | | | Signed-off-by: mwrock <matt@mattwrock.com>
* add interpreter to handle pwsh and powershell to powershell_scriptps_scriptmwrock2020-10-073-16/+70
| | | | Signed-off-by: mwrock <matt@mattwrock.com>
* fix specs on powershell v4 and belowmwrock2020-10-052-7/+7
| | | | Signed-off-by: mwrock <matt@mattwrock.com>
* Merge pull request #10476 from chef/exec_coreTim Smith2020-10-051-2/+39
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * add interpreter arg to powershell_exec allowing it to run powershell coremwrock2020-10-011-2/+39
| | | | | | | | Signed-off-by: mwrock <matt@mattwrock.com>
* | add interpreter arg to powershell_out allowing it to call pwsh.exemwrock2020-10-014-2/+30
|/ | | | Signed-off-by: mwrock <matt@mattwrock.com>
* Remove unncessary test state.remove-unnecessary-config-setting-in-testPete Higgins2020-09-251-4/+0
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Pull in the new tty-table to unlock new license-acceptancetty-tableTim Smith2020-09-203-5/+3
| | | | | | | | tty-table was holding back a bunch of deps. This will resolve several Ruby 2.7 warnings and lets use use the optimized license-acceptance gem that also had pete's better error handling. This also nukes a few deps to make chef/chef smaller. Includes misc chefstyle fixes for the new version Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix xml parsing specTim Smith2020-09-171-1/+67
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #10438 from chef/speedup_specsTim Smith2020-09-161-1/+1
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Speed up a openssl helper specsspeedup_specsTim Smith2020-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was one of our top 10 slow specs Before: Chef::Mixin::OpenSSLHelper#dhparam_pem_valid? When the dhparam.pem file does exist, and does contain a vaild dhparam key returns true 2.71 seconds ./spec/unit/mixin/openssl_helper_spec.rb:101 After: 0.01765 seconds ./spec/unit/mixin/openssl_helper_spec.rb:538 Chef::Mixin::OpenSSLHelper#dhparam_pem_valid? When the dhparam.pem file does exist, and does contain a vaild dhparam key returns true Signed-off-by: Tim Smith <tsmith@chef.io>
* | Update the spec for the new behaviorTim Smith2020-09-161-2/+1
| | | | | | | | | | | | | | Now that we don't check the value first we're only calling it once, which is :dope: Signed-off-by: Tim Smith <tsmith@chef.io>
* | Resolve Lint/RedundantRequireStatement warningsTim Smith2020-09-161-1/+0
|/ | | | | | | These are required by Ruby out of the box so lets avoid trying to require them again. Signed-off-by: Tim Smith <tsmith@chef.io>
* Update spec/unit/train_transport_spec.rbLamont Granquist2020-09-151-1/+1
| | | Co-authored-by: pete higgins <pete@peterhiggins.org>
* Move TrainTransport to ChefConfigLamont Granquist2020-09-151-13/+14
| | | | | | | | | | Also pull in some helpers from the Ohai work so that Ohai can use them later. This is code rearrangement to support the remote ohai work but does not change any existing behavior yet. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Move to using ChefConfig for CONF_DIRLance Albertson2020-09-151-1/+1
| | | | Signed-off-by: Lance Albertson <lance@osuosl.org>
* merge all dist files back into dist.rbMarc Chamberland2020-09-153-3/+3
| | | | | Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com> Signed-off-by: Lance Albertson <lance@osuosl.org>
* tighten all require statements for dist implementationMarc Chamberland2020-09-157-5/+7
| | | | | Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com> Signed-off-by: Lance Albertson <lance@osuosl.org>
* move dist implementation into chef-utilsMarc Chamberland2020-09-157-29/+29
| | | | | Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com> Signed-off-by: Lance Albertson <lance@osuosl.org>
* Allow users to take a String as wellTim Smith2020-09-111-2/+7
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Simplify validation and add some unit testsTim Smith2020-09-111-0/+20
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add initial unit testTim Smith2020-09-112-1/+31
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #10423 from chef/sidTim Smith2020-09-111-27/+108
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * allow the use of SIDs in windows securable resourcesmwrock2020-09-111-27/+108
| | | | | | | | Signed-off-by: mwrock <matt@mattwrock.com>
* | Add system_name property to rhsm_register resourceJason Barnett2020-09-101-0/+30
| | | | | | | | Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* | Merge pull request #10371 from chef/lcg/ohai-timing-testLamont Granquist2020-09-091-0/+61
|\ \ | | | | | | Signed-off-by: Lamont Granquist <lamont@chef.io>
| * | Add an ohai timing test to find busted DNS on CI testerslcg/ohai-timing-testLamont Granquist2020-09-081-0/+61
| | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | Merge pull request #10401 from chef/fileTim Smith2020-09-0924-39/+39
|\ \ \ | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | Use __dir__ instead of getting the dir of __FILE__Tim Smith2020-09-0924-39/+39
| | |/ | |/| | | | | | | | | | | | | This is a bit easier to read Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Allow cpu_quota values > 100Tim Smith2020-09-091-1/+1
|/ / | | | | | | | | | | Turns out on multi-core boxes these are valid. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #10370 from chef/remove_loopsTim Smith2020-09-091-2/+0
|\ \ | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Remove a redundant spec loopremove_loopsTim Smith2020-09-081-2/+0
| |/ | | | | | | | | | | We were looping over the same object twice here. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Mock File.expand_path to fix window C:/ dir appended in absolute pathVivek Singh2020-09-091-0/+1
|/ | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* Merge pull request #10396 from chef/stringsTim Smith2020-09-081-9/+8
|\ | | | | Use include? to example strings when we don't need a regex
| * Use include? to example strings when we don't need a regexstringsTim Smith2020-09-081-9/+8
| | | | | | | | | | | | There's no need for match? with regex here. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #10395 from chef/faster_rhsmTim Smith2020-09-081-18/+26
|\ \ | |/ |/| Signed-off-by: Tim Smith <tsmith@chef.io>
| * Stop using grep to parse textfaster_rhsmTim Smith2020-09-081-18/+26
| | | | | | | | | | | | This one is pretty odd. We would grep the line to see if it includes katello-ca-consumer and then we'd check it again in ruby. Let's just do that work once now. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #10393 from chef/VSingh/data-collector-output-locationsTim Smith2020-09-082-113/+207
|\ \ | |/ |/| Signed-off-by: Tim Smith <tsmith@chef.io>
| * Config validation updatesVivek Singh2020-09-091-14/+21
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * Fixes build failureVivek Singh2020-09-081-1/+1
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * Data collector multiple fixesVivek Singh2020-09-082-113/+200
| | | | | | | | | | | | | | - Fix invalid output_locations raise start_time error. - Improve validate_output_locations! Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Resolve RuboCop Style/RedundantInterpolation warningsTim Smith2020-09-082-3/+3
|/ | | | | | Resolve the issues that pete pointed out plus a few others Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #10382 from chef/lcg/fix-nil-deep-mergeLamont Granquist2020-09-041-0/+15
|\ | | | | Signed-off-by: Lamont Granquist <lamont@chef.io>
| * Fix nil deep_merginglcg/fix-nil-deep-mergeLamont Granquist2020-09-031-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While this behavior was fixed for attributes a long, long time ago it turns out we don't use this deep_merge mixin for constructing the deep merge of attribute precedence levels any more. This bug however surfaces because we still use deep_merge to merge json attributes into normal attributes. That means that it is not possible to pass a nil / null value in through -j and have it override a normal attribute which is pulled back in from the node object on the chef-server. So this fixes that behavior to be consistent with the behavior of attributes that we've had for several years now. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | chef_client_systemd_timer: Add the ability to set CPUQuota on the ↵Tim Smith2020-09-031-1/+36
|/ | | | | | | | chef-client unit This allows us to set a quota like 50% on everything handled by the chef-client including all the sub-processes like ohai or inspec. I looked at using systemd's nice functionality since that would give us a unified property for all the *nix processes, but that only applies to the chef-client process itself. This is much more powerful and gives users what user's probably really want which is "chef and all its stuff should not consume all the CPU on my host". Signed-off-by: Tim Smith <tsmith@chef.io>
* Set correct config value.shell-test-cleanupPete Higgins2020-09-011-1/+1
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Cleanup tests to make test setup more consistent.Pete Higgins2020-09-011-41/+34
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Move code to where it is used and remove top level constants.Pete Higgins2020-09-013-44/+62
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Merge pull request #10362 from chef/client_updatesTim Smith2020-08-282-37/+65
|\ | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Use bash to run sleep/chef-client in chef_client_launchdclient_updatesTim Smith2020-08-271-5/+5
| | | | | | | | | | | | My googling tells me this is the recommended way to run multiple commands. Signed-off-by: Tim Smith <tsmith@chef.io>