summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
| * Fix specs on windowsTim Smith2020-08-271-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add splay property to chef_client_launchdTim Smith2020-08-271-17/+45
| | | | | | | | | | | | Use the same splay method we used in chef_client_cron resource. Signed-off-by: Tim Smith <tsmith@chef.io>
| * Rename the cron_command method for easier diffingTim Smith2020-08-271-19/+19
| | | | | | | | | | | | This makes the specs easier to diff. I also shuffled around some specs Signed-off-by: Tim Smith <tsmith@chef.io>
* | removed unnecessary 'ostruct' from linux mount provider spec.antima-gupta2020-08-281-1/+0
| | | | | | | | | | | | | | Added permalink for Regex. Renamed the linux_mount recipe file to mount in kitechen-tests. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* | Update changes as per review comment.antima-gupta2020-08-271-39/+46
| | | | | | | | Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* | Added context in the linux mount provider specantima-gupta2020-08-271-60/+64
| | | | | | | | Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* | Fixed mount Resource for bind mounts is not idempotent.antima-gupta2020-08-271-0/+87
|/ | | | | | | | Added a separate linux mount provider. Define 'mounted?' method and used 'findmnt -rn' command to list mount points along with device. Added linux_mount recipe to kitchen-tests. Signed-off-by: antima-gupta <agupta@msystechnologies.com>
* Merge pull request #10357 from chef/better_launchd_propertiesTim Smith2020-08-261-0/+22
|\ | | | | Improve input handling and validation in chef_client_launchd
| * Rename the spec fileTim Smith2020-08-261-0/+0
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Improve input handling and validation in chef_client_launchdbetter_launchd_propertiesTim Smith2020-08-261-0/+22
| | | | | | | | | | | | | | | | Validate correct nice ranges Make sure interval is a positive value Allow nice and interval to be input as Strings Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #10358 from chef/add_back_niceTim Smith2020-08-261-0/+21
|\ \ | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Add back nice functionality to chef_client_cronTim Smith2020-08-261-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | This was in the cookbook recipe before and was useful for low resource systems where the client could impact host operations. Since we support this in launchd now, it makes sense to do it here as well. Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Validate nice values in the launchd resourceTim Smith2020-08-261-0/+8
|/ / | | | | | | | | | | Make sure people give us proper nice values. Also the upper value is 19 not 20. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #10351 from chef/VSingh/knife-list-deprecation-updateTim Smith2020-08-264-124/+58
|\ \ | |/ |/| more config specs cleanup & remove deprecated from knife config list
| * Remove border color optionVSingh/knife-list-deprecation-updateVivek Singh2020-08-261-5/+5
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * knife config show specsVivek Singh2020-08-261-0/+192
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * more config specs cleanupVivek Singh2020-08-264-308/+50
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Add initial take at chef_client_launchdTim Smith2020-08-251-0/+77
|/ | | | | | | The good: We have a resource to configure chef-client to run as a service on macos The bad: Launchd will stop the service if a reconfigure is necessary and it will not start back up. This is a known issue and it exists in the chef-client cookbook as well, but we need to solve it by forked off the chef-client process before we restart the launchd agent. Signed-off-by: Tim Smith <tsmith@chef.io>
* Update `knife config list` with new behavior and fix tests.Pete Higgins2020-08-252-18/+13
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Merge pull request #10341 from chef/VSingh/add-tty-tableTim Smith2020-08-251-22/+23
|\ | | | | knife config list-profiles UI with tty-table
| * Mock TTY::Screen to fix table dynamic natureVivek Singh2020-08-251-0/+1
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
| * Fix failing specsVivek Singh2020-08-241-22/+22
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Merge branch 'master' into bug_sirTim Smith2020-08-244-10/+18
|\ \ | |/
| * Merge pull request #9482 from MsysTechnologiesllc/dh/Fix-knife-ssh-hang-win2k16Tim Smith2020-08-211-2/+2
| |\ | | | | | | Avoid knife ssh freeze on windows
| | * fix specsdheerajd-msys2020-08-191-2/+2
| | | | | | | | | | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
| * | rescue all configuration errors and re-raiseNaomi Reeves2020-08-202-8/+6
| | | | | | | | | | | | Signed-off-by: Naomi Reeves <NaomiReeves@users.noreply.github.com>
| * | define unique exit code for configuration failures and handle correctlyNaomi Reeves2020-08-201-0/+10
| | | | | | | | | | | | Signed-off-by: Naomi Reeves <NaomiReeves@users.noreply.github.com>
* | | Run the User::MacUser and User::Dscl tests on the correct systemsbug_sirTim Smith2020-08-244-12/+9
|/ / | | | | | | | | | | Right now we attempt to run the dscl function specs on all macos systems, when only 10.13 still supports that. We're also only running the macuser functional specs on 10.14 even though that should be running on 10.15 as well. With the introduction of 11.0 the DSCL specs no longer run so we need this fix in order to move forward, but it also ensures we're correctly testing macos releases. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Simplify macos detection in specs to include big surmac_specTim Smith2020-08-202-18/+5
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #10331 from chef/client_trustedTim Smith2020-08-191-0/+54
|\ \ | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Chefstyle fixTim Smith2020-08-191-2/+2
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Add basic unit test of properties and the helper methodTim Smith2020-08-191-0/+54
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Merge pull request #10190 from chef/lcg/add-integ-and-unit-specs-to-omnibusLamont Granquist2020-08-1910-9/+27
|\ \ \ | |/ / |/| |
| * | Add unit and integration testing back to omnibus testersLamont Granquist2020-08-1710-9/+27
| | | | | | | | | | | | | | | | | | It is slow but it does catch real bugs Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | | Fix spec describe namesTim Smith2020-08-191-4/+4
| |/ |/| | | | | | | | | This was missed in a code review of #10323 Signed-off-by: Tim Smith <tsmith@chef.io>
* | Rename method to match othersTim Smith2020-08-181-3/+3
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Match on the specific error messageTim Smith2020-08-181-1/+1
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Use .error? and make sure not to raise too earlyTim Smith2020-08-181-2/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Make sure to not raise too earlytimezoneTim Smith2020-08-181-2/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Add a spec for the legacy RHEL state loadingTim Smith2020-08-181-0/+8
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>