summaryrefslogtreecommitdiff
path: root/spec/functional/resource
Commit message (Collapse)AuthorAgeFilesLines
* only test these on rhel >= 8 where they worklcg/fix-dnf-rhel8Lamont Granquist2019-07-191-5/+5
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove rspec config for TravistravisTim Smith2019-07-092-4/+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>
* fix 4 copsLamont Granquist2019-07-053-8/+12
| | | | | | | | | | | | | | - 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-10/+4
| | | | | | enforce pretzels. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/StringLiteralsInInterpolationLamont Granquist2019-07-059-19/+19
| | | | | | since we use double quotes, be consistent everywhere. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/ClassCheckLamont Granquist2019-07-051-2/+2
| | | | | | convert kind_of? to is_a? Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/RegexpLiteralLamont Granquist2019-07-051-2/+2
| | | | | | | 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-051-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Layout/MultilineMethodCallIndentationLamont Granquist2019-07-021-3/+3
| | | | | | | | Layout/MultilineMethodCallIndentation: Enabled: true EnforcedStyle: indented Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/MethodCallWithoutArgsParenthesesLamont Granquist2019-07-022-6/+6
| | | | | | | | 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-022-2/+2
| | | | | | start enforcing using %i{} instead of arrays of symbols Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/EmptyLineAfterGuardClauseLamont Granquist2019-07-021-0/+1
| | | | | | | 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-021-5/+5
| | | | | | | | | | | | | | 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-023-7/+7
| | | | | | | | result of automation https://github.com/chef/chefstyle/pull/72 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* 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>
* Enable All BK verification testsJaymala Sinha2019-06-041-1/+1
| | | | Signed-off-by: Jaymala Sinha <jsinha@chef.io>
* Fix service enable idempotency in sles11 (#8256)dheerajd-msys2019-05-231-0/+205
| | | | | | * fix service enable idempotency in sles11 Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* Merge pull request #8418 from cc-build/bulk_distro_constantLamont Granquist2019-04-291-12/+13
|\ | | | | "chef-client" => #{Chef::Dist::CLIENT}
| * chef-client => Chef::Dist::CLIENTMarc Chamberland2019-04-261-12/+13
| | | | | | | | Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
* | Add start_when_available support to windows_taskVivek Singh2019-04-261-0/+51
| | | | | | | | Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
* | Merge pull request #8168 from ↵Bryan McLellan2019-04-261-2/+2
|\ \ | |/ |/| | | | | MsysTechnologiesllc/Vijay/MSYS-958_write_permissions_does_not_work_properly_on_windows Fix for write permissions were not working properly on windows
| * Minor fixes as per the review commentsvijaymmali19902019-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | - Using proper verbiage for constant SUBFOLDERS_AND_FILES_ONLY - Source https://metacpan.org/pod/Win32::Security::ACE#dbmAceFlags - Minor DRY up and Fixes - Ensured chefstyle Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
| * - Minor fixes to fix functional test casesvijaymmali19902019-02-111-2/+2
| | | | | | | | | | | | | | | | - Added functional test cases for deny_rights option - Ensured chef style - Fixes MSYS-958 Signed-off-by: vijaymmali1990 <vijay.mali@msystechnologies.com>
* | Limit locale resource to LinuxBryan McLellan2019-04-151-45/+64
| | | | | | | | | | | | Platforms that don't use /etc/locale.conf aren't supported Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* | Merge pull request #8359 from chef/btm/fix-dsc-test-errorsTim Smith2019-04-111-1/+1
|\ \ | | | | | | Don't force DSC functional tests to PS4
| * | Don't force DSC functional tests to PS4btm/fix-dsc-test-errorsBryan McLellan2019-04-111-1/+1
| | | | | | | | | | | | | | | | | | New Windows platforms like 2016 have Powershell 5. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* | | Avoid accidentally reusing a gid in testsBryan McLellan2019-04-111-1/+12
|/ / | | | | | | | | | | | | Some platforms have groups in odd ranges, make sure the gid we select is not in use. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* | locale resource: Add support to set all LC ENV variablesNimesh-Msys2019-04-041-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | - Deprecated `lc_all` - Provided other features like generate locale if it is not available - Removed system dependancy - Added unit and functional test cases - Added YARD format comments - Ensured Chefstyle - Fixes: MSYS-988 Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* | windows_certificate: Import root/nested certificates while importing P7B ↵Nimesh-Msys2019-02-251-0/+75
| | | | | | | | | | | | | | | | | | | | certificates - P7B might contain multiple certificates and we should not miss the internal one while import. - Added test cases and ensured chef-style - Fixes: MSYS-977 Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* | Fetching OpenSSL::X509::Certificate object without shell interactions.Nimesh-Msys2019-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | - Previously, we were building a new OpenSSL::X509::Certificate object with PEM string contents. - To get this content, we were using openssl utility and were converting all certificate types into PEM - And were extracting the PEM contents out of resulting data. - It could directly be done via correct usage of applicable classes. - Reverted using Open3. It uses shell hence did not solved the purpose. Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* | Windows Certificate: Add support to import Base 64 encoded CER certificatesNimesh-Msys2019-02-121-0/+16
|/ | | | | | | | | | - Till now, cer certificates were only considered to be in binary format (DER) - They can also be base-64 encoded(PEM) - We should only append "inform DER" only if it is a binary certificate, otherwise, default ("inform PEM") would support base64 encoded certificates. - Added test caes - Ensured Chef style Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* Avoid groups < 2000 in testingjjustice6-tweak_solaris_usermodTim Smith2019-02-071-3/+2
| | | | | | Further avoid system reserved groups Signed-off-by: Tim Smith <tsmith@chef.io>
* comment on group name length being for solaris & possibly othersJoshua Justice2019-02-071-1/+2
| | | | Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
* fix typo in commentJoshua Justice2019-02-071-1/+1
| | | | Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
* Update the functional spec and provider behavior to matchJoshua Justice2019-02-071-36/+5
| | | | Signed-off-by: Joshua Justice <jjustice6@bloomberg.net>
* Merge pull request #8167 from ↵Tim Smith2019-02-051-7/+13
|\ | | | | | | | | MsysTechnologiesllc/nimesh/MSYS-960_set_psscript_flags powershell_script: Prefer user provided flags over the defaults
| * As per the review commentsNimesh-Msys2019-02-041-7/+13
| | | | | | | | | | | | | | - Using `flags` attribute from resources itself - Fixed and add the required test cases Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* | Merge pull request #8201 from ↵Tim Smith2019-02-041-71/+108
|\ \ | | | | | | | | | | | | MsysTechnologiesllc/nimesh/MSYS-971_windows_task_clear_args windows_task: Minor fix while setting command and arguments of task
| * | windows_task: Minor fix while setting command and arguments of taskNimesh-Msys2019-02-041-71/+108
| |/ | | | | | | Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* | Import PFX certificates with their private keysNimesh-Msys2019-02-041-0/+61
|/ | | | | | | | | - Using `add_pfx` of Win32::Certstore to import a PFX certificate with its thumbprint - Using correct version of `win32-certstore` to support these changes - Added Test cases - Minor cleanup and opimization Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* Merge pull request #8118 from ↵Tim Smith2019-01-241-0/+340
|\ | | | | | | | | MsysTechnologiesllc/nimesh/MSYS-937_windows_certificate_idempotency windows_certificate: Ensure all actions are fully idempotent
| * Should be run only on Appveyor, without affecting anyone elses machineNimesh-Msys2019-01-241-1/+1
| | | | | | | | Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
| * Adding Functional specs for windows_certificate.Nimesh-Msys2019-01-241-0/+340
| | | | | | | | | | | | - Mostly focus on all major actions and their idempotency. Signed-off-by: Nimesh-Msys <nimesh.patni@msystechnologies.com>
* | Remove bogus "solaris" platform from specsTim Smith2019-01-231-3/+3
|/ | | | | | We have a solaris2 platform, but not a solaris platform. Signed-off-by: Tim Smith <tsmith@chef.io>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-154-13/+13
| | | | | | | this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #8110 from chef/mac_os_user_cleanupTim Smith2019-01-141-9/+2
|\ | | | | user resource: Remove support for macOS 10.7 and 10.7 upgraded to 10.8+
| * user resource: Remove support for macOS 10.7 and 10.7 upgraded to 10.8+Tim Smith2019-01-141-9/+2
| | | | | | | | | | | | We can greatly simplify our dscl user provider by removing support for macOS 10.7 and 10.7 which has been upgraded to 10.8. No one is using this anyone as it's beyond EOL with Apple and has been for years. Signed-off-by: Tim Smith <tsmith@chef.io>
* | windows_task resource: allow non-system users without password for ↵Nimesh2019-01-071-7/+51
|/ | | | | | | | | | | | interactive tasks - Minor changes in `validate_user_and_password` to support this feature - `validate_interactive_setting` would no longer be needed - Added test cases - Added support to latest version of win32-taskscheduler gem (2.0.4) - Fixes MSYS-924 Signed-off-by: Nimesh <nimesh.patni@msystechnologies.com>
* Cleanup some functional helpersfunctional_cleanupTim Smith2018-12-042-2/+2
| | | | | | Rename the macos helpers. Remove unused helpers to check for RHEL 5 and < Windows 2008 R2. Signed-off-by: Tim Smith <tsmith@chef.io>