Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
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
|
|
Correct the typo missing :if=> in the previous
checkin 45e165016534b6c786d269a7825e72599c9beaa6
|
|
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.
|
|
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>
|
|
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
|
|
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>
|
|
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>
|
|
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.
|
|
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>
|
|
Fixing test errors:
wrong argument type Symbol (expected Proc)
undefined method `lines' for #<Array:0x1020823e0>
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
|
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>
|
|
Paired-with: Max Martin <max@puppetlabs.com>
|
|
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>
|
|
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>
|
|
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>
|