summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #892 from opscode/lcg/unbundle-testslamont-granquist2013-07-121-1/+1
|\ | | | | get first gem.bat in path rather than last
| * get first gem.bat in path rather than lastLamont Granquist2013-07-111-1/+1
| |
* | Merge branch '11-stable'sersut2013-07-121-1/+1
|\ \
| * \ Merge pull request #893 from opscode/error_description_formattingSerdar Sutay2013-07-121-1/+1
| |\ \ | | | | | | | | Change error description sections elements to be hashes.
| | * | Change error description sections elements to be hashes.tylercloke2013-07-081-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is much easier for erlang to validate the json that chef-client sends up if exception_data.description.sections is of structure: [{"str1" => "value1"}, ... ] As opposed to current structure of: [["str1", "value1"], ... ] This change was achieved by updating error_description.rb. I also updated relevant test.
* | | Avoid conflicts w/ rspec's ARGV in testsdanielsdeleo2013-07-112-0/+12
| | |
* | | Upgrade rspec to 2.13.xdanielsdeleo2013-07-111-1/+1
|/ /
* | update logic so that we don't return dummy values in resource reporterjamesc2013-07-101-4/+4
| |
* | OC-8641 - new_resource.cookbook_version is nil for some resourcesjamesc2013-07-101-0/+51
| | | | | | | | | | | | | | | | | | | | Since the existing tests mocked out Resource#cookbook_version it missed the case where if Resource#cookbook_name is nil then cookbook_version would also be nil. Added guard logic around setting the cookbook_name, cookbook_version in resource_reporter.rb to protect against the case where cookbook_name is nil.
* | Ignore corrupt cache control data; re-download filedanielsdeleo2013-07-091-0/+9
|/ | | | | | | | | Fixes CHEF-4365: http://tickets.opscode.com/browse/CHEF-4365 A corrupt cache control file will cause a persistent failure of the related remote_file resource. Since this data is just a cache of HTTP headers, Chef can ignore corrupted cache control data, re-download the source file, and then re-populate the cache with not-corrupt data.
* this should have been reverted to old behavior, causes failures onLamont Granquist2013-07-031-1/+1
| | | | solaris
* Fix test expectations for windows file separatorsDaniel DeLeo2013-07-031-2/+4
|
* Revert "Merge branch 'CHEF-3307'"Bryan McLellan2013-07-035-26/+1
| | | | | | | | This reverts commit 5713a002062c762e40e4378be6d7763eb3dd61a2, reversing changes made to 4079a344f2001c1927132e7ed6b63453f459609f. Conflicts: spec/unit/cookbook_loader_spec.rb
* Revert "Merge pull request #812 from opscode/lcg/CHEF-3307-empty-string-fix"Bryan McLellan2013-07-031-56/+50
| | | | | This reverts commit 439980b12ed78eb5f61c52cf0d23d4a9205d1011, reversing changes made to de4d8e66be3dee3ccd9ac027e6332e0eb37f532e.
* Use symlink source when inspecting current permissionsdanielsdeleo2013-07-022-12/+54
| | | | | | | | | | | Fixes CHEF-4341 http://tickets.opscode.com/browse/CHEF-4341 When manage_symlink_source is enabled, File providers update current_resource with the security attributes of the source file. Subsequent actions (e.g., running FileAccessControl) use the values set on current_resource to determine if they need to modify the system, so setting them incorrect leads to a file resource being (not) updated incorrectly.
* Merge pull request #863 from opscode/lcg/diff-encodinglamont-granquist2013-07-024-14/+369
|\ | | | | Lcg/diff encoding
| * fix spec test for ruby-2.0Lamont Granquist2013-07-011-1/+1
| |
| * many bugs:Lamont Granquist2013-06-281-12/+352
| | | | | | | | | | | | | | - multiline is_binary? regex was broken - multiline rspec tests were all broken - Tempfile.new was a big no-op on several tests - lots of support for handling different encodings and UTF-8 output
| * ruby >= 1.9 is more useful than ruby == 1.9 in a ruby 1.9+2.0 worldLamont Granquist2013-06-283-1/+16
| |
* | Don't call readlines on stderr which is a string object.sersut2013-06-281-36/+17
|/
* Test manage_symlink_source w/ links to linksdanielsdeleo2013-06-261-0/+36
| | | | | | | | - Increases test coverage for CHEF-4312 patch. - Adds explicit coverage for managing symlink->[symlink ...]->file. It was previously determined that `File.realpath` handles this case, but this adds an explict test in case behavior is inconsistent across platform/ruby version/etc.
* Update tests to expect normalized filenamesDaniel DeLeo2013-06-261-4/+10
| | | | | | | - Relates to CHEF-4312 - Updates unit tests to expect "normalized" filenames where method arguments are now using File.realpath(path) instead of path; on *NIX these are the same, on Windows, \ gets converted to /.
* Fix spec file loading annoyancesdanielsdeleo2013-06-263-22/+30
| | | | | | - Don't load all knife subcommands. Fixes error running tests on 1.8 when you have 1.9-only plugins installed. - Adjust spec file loading to use paths relative to spec/
* Allow file resources to manage files via symlinkdanielsdeleo2013-06-261-26/+164
| | | | | | | | | | Fixes CHEF-4312 http://tickets.opscode.com/browse/CHEF-4312 Adds resource attribute `manage_symlink_source` to file resource and descendents. When true, file resources will manage the source file when a symlink exists at the destination path. When nil (default), the source file is managed, but a warning is emitted. When false, symlinks are not followed. In Chef 12, the default should be changed to false.
* Determine if ACL mgmt follows symlinks by provider type.danielsdeleo2013-06-251-1/+1
| | | | | | | | - Prerequisite for CHEF-4312 fix. - File access control defers to the provider to determine whether to use link-following system calls or not (e.g., chmod vs. lchmod). File provider and subclasses will use link-following calls (chmod), Link provider uses calls that manage the symlink itself (e.g., lchmod).
* Fix invalid assumption of non-nil code attribute and handle change to use ↵adamedx2013-06-251-2/+2
| | | | -File instead of -Command with powershell.exe
* Fix Win2k3 32-bit status code test failuresadamedx2013-06-251-2/+4
|
* Add functional tests for exit code and flags, fix architecture test verificationadamedx2013-06-252-42/+112
|
* OC-8337: Fix 32-bit OS test breaksadamedx2013-06-251-9/+7
|
* OC-8337: Architecture functional test coverageadamedx2013-06-252-8/+8
|
* OC-8337: Add architecture functional test coverage, fix resource name collisionadamedx2013-06-251-7/+79
|
* Expect user home dir to always be created on RHEL on more tests.sersut2013-06-241-4/+13
|
* Expect user home dir to always be created on RHELdanielsdeleo2013-06-211-2/+9
| | | | | - Inconsistent with other platforms because of etc/login.defs - See CHEF-2205 http://tickets.opscode.com/browse/CHEF-2205
* Expect unlocking user w/o password to fail on slesdanielsdeleo2013-06-211-13/+30
| | | | | | | | On all other linux distros, `usermod`, when attempting to unlock a user with no password set, refuses to unlock the user, but exits with status 0. On SLES 11 and 12, `usermod` exits with status 3, which then causes mixlib shellout to raise an exception. Make the tests differentiate expected behavior by platform.
* Skip test for username with quote where unsupported.danielsdeleo2013-06-211-0/+11
| | | | | Only debian-based platforms appear to support usernames with single quote characters, so skip this test on other platforms.
* Ensure usermod -d option comes before -m.danielsdeleo2013-06-211-5/+6
| | | | | - Fixes CHEF-4305 http://tickets.opscode.com/browse/CHEF-4305 - Fixes RHEL/CentOS 5 usermod bug uncovered by functional tests.
* Ignore exit status 12 when deleting test user accountdanielsdeleo2013-06-211-1/+1
| | | | | | | | | | Various versions of `useradd` return a variety of errors with exit code 12 when removing a user with no home directory and given options indicating the home directory should be removed, regardless of the `-f` flag. This is fixed in newer versions (such as the version on Ubuntu 13.04, where these tests were originally written), but probably won't be fixed for older OSes. Accepting exit code 12 should fix the tests on these platforms.
* Merge pull request #840 from opscode/lcg/cloexec_lockfilelamont-granquist2013-06-203-0/+12
|\ | | | | Lcg/cloexec lockfile
| * add test, bitwise arithm, note about 1.8/1.9/2.0 differencesLamont Granquist2013-06-203-0/+12
| |
* | [CHEF-4204] Fix solaris tests to not access shadow file.danielsdeleo2013-06-203-94/+92
| | | | | | | | | | | | | | | | - Update useradd shared examples to rely on let block defined provider object so custom method stubs can be added. - Stub methods that manipulate shadow file on the solaris provider in the shared examples. - Remove unnecessary test setup from solaris provider specific tests.
* | Pass useradd commands as argv array instead of sh command.danielsdeleo2013-06-204-696/+467
| | | | | | | | | | | | | | | | | | | | | | | | | | - Fixes CHEF-4204 - Useradd provider commands converted from single string to argv array. This bypasses use of bin/sh command interpretation, so there is no need to escape shell-significant characters (e.g., quotes, etc.). - Un-pending-ize useradd functional tests for arguments to useradd with single quote characters. - Update useradd unit tests to expect command as argv splatted arrays. - Extract useradd unit tests to a shared example group. - deduplicate test code between solaris and useradd unit tests using shared example group.
* | [CHEF-4204] Convert useradd provider to shelloutdanielsdeleo2013-06-202-109/+63
| | | | | | | | | | | | | | - Convert all run_command and popen4 calls to shell_out! - Update useradd tests - User::Solaris subclasses from Useradd, so update those tests, too. - Functional tests pass unmodified
* | [CHEF-4204] silence shell out live stream in testsdanielsdeleo2013-06-201-0/+3
| |
* | [CHEF-4204] add lock/unlock testsdanielsdeleo2013-06-201-0/+113
| |
* | Stub that /etc/network/interfaces really is there [on windows]Bryan McLellan2013-06-201-0/+1
| |
* | Merge pull request #833 from opscode/handle-new-depsolver-errorsSerdar Sutay2013-06-191-2/+38
|\ \ | | | | | | Handle new 412 depsolver errors without any cookbook information.
| * | Handle new 412 depsolver errors without any cookbook information.sersut2013-06-191-2/+38
| | |
* | | aix's error message for EPERM is like solaris'sLamont Granquist2013-06-191-7/+7
| | |
* | | CHEF-3521: Wrap the call to yum-dump.rb in a configurable timeout.Phil Dibowitz2013-06-191-20/+36
| | |
* | | [CHEF-972] fixed test unit/runner_spec.rb:379: only_if_called_times.should == 2Xabier de Zuazo2013-06-191-1/+1
| | |