summaryrefslogtreecommitdiff
path: root/spec/integration/provider/mount_spec.rb
AgeCommit message (Collapse)AuthorFilesLines
2013-12-09(#23141) Fix remount on bsd if options are specifiedKylo Ginsberg1-2/+15
The initial fix for 23141 didn't account for a remount when options were specified. This caused integration tests to fail because a) the integration tests assumed mounted is always false when the mountcmd is called (not true for a remount), and b) the integration tests weren't updated to consider the 'update' option. This patch updates the remount method to append ',update' if there are already options, and updates the integration tests accordingly.
2013-06-13(#15837) Do not pass options explicitly when mountingStefan Schulte1-0/+1
The mount provider explicitly passes the mountoptions to the mount command with the "-o" parameter. While this works in most cases it fails when the option property contains an option that needs to be unique as the default behaviour of the mount command seems to be to merge fstab options with explicitly definied options via the commandline. Since the mountprovider always updates the /etc/fstab file before attempting to mount we should not need to pass the options explicitly. The current code mentions some weired behaviour on MacOSX so we keep the original behaviour on MacOS and drop the explicit options on all other platforms. This also fixes #7791
2012-09-13(#16239) mock of facter :operatingsystem pendingrahul1-1/+2
Correct the typo missing :if=> in the previous checkin 45e165016534b6c786d269a7825e72599c9beaa6
2012-09-04(#16239) mock of facter :operatingsystem pendingrahul1-1/+3
Previously, the pending for solaris was specified incorrectly resulting in the test being pending in all platforms. This checkin corrects this mistake. Since Facter[:osfamily] is stubbed before each tests, we save the family value before starting and use it to compare.
2012-07-27(#15514) Add compatibility with change to operatingsystem factHailee Kenney1-1/+1
Priror to this commit, Puppet had many conditionals based of the operatingsystem fact returning `:solaris`. This fact now supports (and can return) several different version of Solaris. Change the conditionals in Puppet which rely on Solaris to rely on the osfamily fact instead, to prevent issues with this change in Facter. <hailee@puppetlabs.com>
2012-07-26(#15547) mock of facter :operatingsystem pendingrahul1-0/+1
Unless we are able to mock the operating system Fact, we will not be able to run all the mount parsing tests running on each platforms. However this is not required. We could aswell run the platform specific test on the specific platform. However this is not done at present. We are just making it pending for solaris since other platforms pass. for the mount_spec, the mocked operating system value is not reflected in lib/puppet/provider/mount/parsed.rb needing @blockdevice to be passed in even though we are impersonating as Darwin
2011-07-28(#8663) Disable spec tests for unsupported functionality on WindowsJosh Cooper1-1/+1
The mount, shell, and ssh_authorized_key types are not supported on Windows, so these spec tests have been disabled when running on Windows. One of the compiler spec tests fails on Windows because Puppet::Util.execute attempts to execute a program named "git rev-parse HEAD". This has different semantics than Unix, where the command is splatted, Kernel.exec(*command). Since this truly is a Windows bug, I removed the fails_on_windows tag and updated ticket #8410. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
2011-07-19Maint: Tagged spec tests that are known to fail on WindowsJosh Cooper1-1/+1
Many spec tests fail on Windows because there are no default providers implemented for Windows yet. Several others are failing due to Puppet::Util::Cacher not working correctly, so for now the tests that are known to fail are marked with :fails_on_windows => true. To skip these tests, you can run: rspec --tag ~fails_on_windows spec Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
2011-04-13maint: clean up the spec test headers in bulk.Daniel Pittman1-0/+0
We now use a shebang of: #!/usr/bin/env rspec This enables the direct execution of spec tests again, which was lost earlier during the transition to more directly using the rspec2 runtime environment.
2011-04-08maint: just require 'spec_helper', thanks rspec2Daniel Pittman1-1/+1
rspec2 automatically sets a bunch of load-path stuff we were by hand, so we can just stop. As a side-effect we can now avoid a whole pile of stupid things to try and include the spec_helper.rb file... ...and then we can stop protecting spec_helper from evaluating twice, since we now require it with a consistent name. Yay. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
2011-04-08maint: Get tests passing on Ruby < 1.8.7Matt Robinson1-1/+1
Fixing test errors: wrong argument type Symbol (expected Proc) undefined method `lines' for #<Array:0x1020823e0> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
2011-03-08maint:Refactor of mount provider integration testsMax Martin1-5/+33
When adding a test for #6309, decided to refactor mount provider integration tests by adding return value to check_fstab method. Paired-with:Paul Berry <paul@puppetlabs.com>
2011-03-08Added integration tests for the mount providerPaul Berry1-35/+64
Paired-with: Max Martin <max@puppetlabs.com>
2011-03-08(#6632) Adding a new mount no longer causes error with umountPaul Berry1-1/+2
There were two problems: * In lib/puppet/type/mount.rb, we were calling provider.mounted? to determine whether we needed to execute "mount" after updating the in-memory fstab record. This wasn't working properly because provider.mounted? makes its decision based on the data stored in the in-memory fstab record. Since the fstab record had just been updated, provider.mounted? was incorrectly returning true even though the device wasn't actually mounted. Fixed this by checking provider.mounted? before updating the in-memory fstab record. * Calling mount from this point in lib/puppet/type/mount.rb is actually too early, because even though the in-memory fstab record has been created, its contents have not been written to `/etc/fstab` yet. Fixed this by storing a :needs_mount entry in the property_hash and checking it at the end of the flush() method. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
2011-03-07Adjust Darwin mount provider tests to pass on LinuxPaul Berry1-2/+2
mount, and umount are located under /bin, instead of /sbin on Linux, so we adjust the ExecutionStub to accept either location. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
2011-03-07Maint: Begin adding integration tests for the mount providerPaul Berry1-0/+93
These tests form a starting point for integration testing the mount provider, using the new Puppet::Util::ExecutionStub mechanism to simulate the state of the machine in response to the execution of "mount" and "umount" commands. The tests currently work around some known bugs (6628, 6632, and 6633). Reviewed-by: Max Martin <max@puppetlabs.com>