| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This joins the two repositories, including full history, into a single run, as
well as landing the interfaces work on the next branch ready for release.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 2.6.next:
Fixed #6562 - Minor kick documentation fix
(#6658) Propagate ENC connection errors to the agent
(#4884) Remove typo from spec test
(#4884) Modify tests to pass on non-OS X systems
(#4884) Revise new exec tests, add a few more
(#4884) Add an shell provider for execs
(#4884) Fix Test::Unit exec tests
(#4884) Break the exec type out to have a posix provider
(#4884) Add consistent path validation and behavior
(#4884) Add expand_path to requiring the spec_helper
(#4884) Autorequire shared behaviors and method to silence warnings
(#4884) Fix whitespace
(#4884) Get rid of open3 require since it wasn't being used
(#5814) Improved cron type specs
(#5814) cron_spec shouldn't depend on cron provider
Manually Resolved Conflicts:
lib/puppet/util/command_line/puppetrun
spec/spec_helper.rb
spec/unit/type/exec_spec.rb
spec/unit/type_spec.rb
test/ral/type/exec.rb
|
| |
| |
| |
| |
| |
| |
| | |
with_verbose_disabled allows you to run tests that muck with constans
without getting spammy warnings.
Reviewed-by: Max Martin and Matt Robinson
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As part of implementing the fixture support I hard-coded the assumption that
the git checkout was a directory named 'puppet'; this broke on our CI server,
and would break for anyone else who didn't follow that default.
This commit eliminates that assumption and depends only on the appropriate
part of the input filename.
Reviewed-By: Paul Berry <paul@puppetlabs.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We move the tempfile cleanup support off into the module that uses it, which
removes some of the dependency on magic globals from configure. It still
exists, but is hidden in the same module that uses it, which helps.
Reviewed-By: Nick Lewis <nick@puppetlabs.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
We validate that fixtures exist, when requested, or that they match something
when they use a glob. This catches internal errors where we don't match any
fixtures with a glob; this can reveal problems that would otherwise avoid all
assertions and result in internal failures.
The code is hidden out in a module, included in the main RSpec namespace.
This doesn't clean up the API any, but it isolates the code more effectively
and keeps the configuration file cleaner.
Reviewed-By: Nick Lewis <nick@puppetlabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function import_if_possible, which was supposed to be responsible
for making sure that no two threads tried to import the same file at
the same time, was not making this decision based on the full pathname
of the file, since it was being invoked before pathnames were
resolved. As a result, if we attempted to import two distinct files
with the same name at the same time (either in two threads or in a
single thread due to recursion), one of the files would not always get
imported.
Fixed this problem by moving the thread-safety logic to happen after
filenames are resolved to absolute paths. This made it possible to
simplify the thread-safety logic significantly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replaced 106806 occurances of ^( +)(.*$) with
The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people
who learned ruby in the 1900s) uses two-space indentation.
3 Examples:
The code:
end
# Tell getopt which arguments are valid
def test_get_getopt_args
element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new
assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")
becomes:
end
# Tell getopt which arguments are valid
def test_get_getopt_args
element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new
assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")
The code:
assert_equal(str, val)
assert_instance_of(Float, result)
end
# Now test it with a passed object
becomes:
assert_equal(str, val)
assert_instance_of(Float, result)
end
# Now test it with a passed object
The code:
end
assert_nothing_raised do
klass[:Yay] = "boo"
klass["Cool"] = :yayness
end
becomes:
end
assert_nothing_raised do
klass[:Yay] = "boo"
klass["Cool"] = :yayness
end
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had a common pattern for creating a temporary
file during integration tests, and this just
makes that common pattern explicit by
moving it to a module in the newly-created
lib directory in the spec directory.
We definitely don't want to go overboard in
using libraries in our tests, but sometimes
it gets a bit excessive to completely avoid them.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
changed and it can't be found otherwise.
Adding $PUPPET/vendor/gems, with unpacked rspec gem there, introducing to spec_helper.rb LOAD_PATH incantation. Eliminating ad hoc unpacked rspec from spec/lib.
Moving monkey_patches and shared_behaviors up under spec/. Adjusting spec_helper.rb accordingly.
Nuking spec/lib.
Fixing up autotest/puppet_rspec.rb to be able to hunt down our vendor/gems/rspec/bin/spec binary. We can now run rspec without having to have the rspec gem installed.
|
| |
|
|
|
|
|
| |
rspec version. It's not perfect, in that it only tests
the :ensure state, but that's where 90% of the behaviour is.
|
| |
|
|
|
|
| |
autotest config file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Puppet specs.
Created a spec/lib/monkey_patches/ directory for holding patches to RSpec functionality.
Extraced 'confine' and 'runnable?' support from the local copy of RSpec (spec/lib/spec/) and now load them from the monkey_patches/ directory.
Fixed a bad include in one of the specs.
Made it possible for the gem-installed spec binary (which autotest calls) to be used with Puppet.
Imported the Autotest::Rspec class, created a PuppetRspec autotest class, added a discovery.rb file for autotest to pick these up.
Autotest still has the following problems:
* it needs to be run with the proper include path:
% ruby -I spec/lib/ `which autotest`
* the patterns in our custom autotest handler (puppet_rspec) aren't yet fully specified (they
only recognize changes in our spec files, not changes in the puppet libs
which they are testing)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
single files, across modules, local file system,
and the traditional file server.
This work revolves around making sure that the termini
produce functional file instances, meaning that they
know how to find their content or metadata, which largely
comes down to setting their paths correctly.
I also created a new terminus base class for the local
filesystem, since there was so much common code between
content and metadata.
|
| |
|
|
|
|
| |
to :file.
|
|
|
|
|
|
|
|
|
|
| |
This was done by putting all of the functionality in the
Content and Metadata class (actually, in a new base class
for them).
There are still some issues, and there need to be integration
tests between the :local (soon to be renamed :file) termini for
these classes.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
module_files indirection terminus types. Both hooks
use the fileserver configuration, but the module_files
hook only uses the 'modules' mount.
Also moved all responsibility for knowing whether to
use the 'modules' terminus type to the terminus selector;
it was previously spread between that and the file_server
terminus, which made some things annoyingly complicated.
This normalizes the deprecation notices and the logic about
how we make these decisions.
|
|
|
|
| |
tests accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use it, and added integration tests at the most important
hook points.
This provides the final class structure for all of these classes,
but a lot of the class names are pretty bad, so I'm planning on
going through all of them (especially the file_server stuff) and
renaming.
The functionality is all here for finding files, though (finally).
Once the classes are renamed, I'll be adding searching ability
(which will enable the recursive file copies) and then adding
the link management and enabling ignoring files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
addition to Rest): A local terminus that just uses direct file paths,
and a mounts terminus that uses the file server to figure out what
the path should be.
It looks like it also makes sense to split the 'mounts' terminus further,
so there is a 'modules' terminus used to look files up in the terminus.
I've added some integration tests to verify that everything is
hooked together correctly.
Lastly, I added a directory for shared behaviours. There's a ton of
duplication in this setup, because the Content and Metadata classes
behave almost but not quite identically across the board.
|
| |
|
|
|
|
| |
and are used instead of the network handlers, which have been removed. There are some failing tests as a result, but I want to get this code committed before I massage the rest of the system to make it work again.
|
|
|