summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Adding a :code setting for specifying code to runLuke Kanies2007-10-054-26/+13
| | | | | | | | | | | | | | | | | | | | | | | | instead of a manifest, and removing all of the ambiguity around whether an interpreter gets its own file specified or uses the central setting. Most of the changes are around fixing existing tests to use this new system.
| * | This commit is focused on getting the 'puppet' executableLuke Kanies2007-10-053-42/+18
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to work. As a result, it involves a lot of integration-level testing, and a lot of small design changes to make the code actually work. In particular, indirections can now have default termini, so that configurations and facts default to their code terminus Also, I've removed the ability to manually control whether ast nodes are used. I might need to add it back in later, but if so it will be in the form of a global setting, rather than the previous system of passing it through 10 different classes. Instead, the parser detects whether there are AST nodes defined and requires them if so or ignores them if not. About 75 tests are still failing in the main set of tests, but it's going to be a long slog to get them working -- there are significant design issues around them, as most of the failures are a result of tests trying to emulate both the client and server sides of a connection, which normally would have different fact termini but in this case must have the same terminus just because they're in the same process and are global. The next step, then, is to figure that process out, thus finding a way to make this all work.
* / Moving the webrick/mongrel "servers" over to HTTPServer module instead of ↵Rick Bradley2007-10-055-10/+10
|/ | | | Server. Using Server as the master class for client connections. Server (former RESTServer) will instantiate the appropriate subclass based upon Puppet configurator setting. There are now tests broken in the network section which I can't seem to figure out yet. Not a happy place to be.
* Fixed #827. Applied a form of the patch provided by porridge andMichael V. O'Brien2007-10-041-1/+2
| | | | wrote a test.
* Attempting to reproduce and fix #829 by applying patch by Paul. I could notLuke Kanies2007-10-041-1/+6
| | | | | | get a test to show the exception, nor could I figure out how the coding bug could have actually had an impact, but it's an innocent-enough fix, so I'm fine applying it.
* Merge branch 'master' of ssh://reductivelabs.com/opt/rl/git/puppetLuke Kanies2007-10-03133-133/+0
|\ | | | | | | | | | | | | Conflicts: lib/puppet/defaults.rb lib/puppet/dsl.rb
| * Removing the Id tags from all of the filesLuke Kanies2007-10-03133-133/+0
| |
* | I finally tracked down the problem that was causing providersLuke Kanies2007-10-034-15/+30
|/ | | | | | | | | | | | to sometimes suddenly disappear and thus tests to fail -- Kernel.require was not loading the normal ruby path (e.g., 'puppet/type/cron'), so if someone else loaded that then it would replace the in-memory type with a new one, but that new one couldn't load its own providers, because the Kernel would ignore the providers, thinking they were already loaded. This doesn't fix all of the autoloading problems, but at least we won't suddenly break a ton of tests.
* Merge branch 'master' of git://reductivelabs.com/puppetDavid Lutterkort2007-10-023-14/+19
|\
| * Fixed a failing test where we presumed that non-string Fact values would ↵Rick Bradley2007-10-021-1/+1
| | | | | | | | have type preserved across a P::N::Client.master.facts call, which is not true.
| * Fixed a test which was secretly sneaking off and pulling certs from ~ if ↵Rick Bradley2007-10-022-13/+18
| | | | | | | | they were there: Added set_mygroup method, removed duplicate setme method. Included PuppetTest in the XMLRPC servlect test.
* | Use external helper script to talk to yum; should avoid any more trouble ↵David Lutterkort2007-10-021-0/+3
|/ | | | | | with "yum list". Fixes trac #836 Signed-off-by: David Lutterkort <dlutter@redhat.com>
* Merge branch 'indirection' of git://reductivelabs.com/puppet-lukeLuke Kanies2007-09-2544-2199/+379
|\
| * Renaming the 'Puppet::Util::Config' class toLuke Kanies2007-09-2210-28/+27
| | | | | | | | | | | | | | 'Puppet::Util::Settings'. This is to clear up confusion caused by the fact that we now have a 'Configuration' class to model host configurations, or any set of resources as a "configuration".
| * Merge branch 'configurations' into indirectionLuke Kanies2007-09-2230-1036/+298
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/defaults.rb lib/puppet/indirector/facts/yaml.rb spec/unit/indirector/indirection.rb spec/unit/indirector/indirector.rb
| | * All tests now pass in this configuration branch, which meansLuke Kanies2007-09-225-118/+15
| | | | | | | | | | | | | | | | | | | | | | | | it's time to merge it back into the indirection branch. Considering that this work was what drove me to create the indirection branch in the first place, i should now be able to merge both back in the master branch.
| | * The structure for handling resource generation is nowLuke Kanies2007-09-222-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in place, which means I'm over the hump in developing this branch. I have to fix some design flaws I made in the configurations, particularly that the 'runner' handler needs to be able to specify tags and whether to ignore schedules, but otherwise, I think it's straightforward test- and bug-fixing from here out.
| | * An intermediate commit so I can start working on a differentLuke Kanies2007-09-201-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | branch. The file recursion code actually works for the first time in a painful while, but there are still some quirks and design issues to resolve, particularly around creating implicit resources that then fail (i.e., the behaviour of the create_implicit_resource method in Configuration).
| | * This is basically another intermediate commit. I feel likeLuke Kanies2007-09-1724-692/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've gone too far down the rabbit hole to turn back now, but the code is clearly getting more centralized around the Configuration class, which is the goal. Things are currently a bit muddy between recursion, dynamic resource generation, transactions, and the configuration, and I don't expect to be able to clear it up much until we rewrite all of the tests for the Transaction class, since that is when we'll actually be setting its behaviour. At this point, Files (which are currently the only resources that generate other resources) are responsible for adding their edges to the relationship graph. This puts them knowing more than I would like about how the relationship graph works, but it'll have to do for now. There are still failing tests, but files seem to work again. Now to go through the rest of the tests and make them work.
| | * The whole system now uses Configuration objects instead ofLuke Kanies2007-09-155-236/+156
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ever converting the Transportable objects into a tree of components and then converting that into a graph. This is a significant step, and drastically simplifies the model of how to use a configuration. The old code might have looked something like this: file = Puppet::Type.create :path => "/whatever", ... comp = Puppet::Type.create :name => :whatever comp.push file transaction = comp.evaluate transaction.evaluate The new code looks like this: file = Puppet::Type.create :path => "/whatever", ... config = Puppet::Node::Configuration.new config.add_resource file config.apply I did not really intend to do this much refactoring, but I found I could not use a Configuration object to do work without refactoring a lot of the system. The primary problem was that the Client::Master and the Config classes determined how the transactions behaved; when I moved to using a Configuration, this distinction was lost, which meant that configurations were often needing to create other configurations, which resulted in a whole lot of infinite recursion (e.g., Config objects that create directories for Puppet use Configuration objects -- yes, I'm s/Config/Settings/g soon -- and these Configuration objects would need to create directories). Not everything is fixed, but it's very close. I am clearly over the hump, though, so I wanted to get a commit in.
| * Adding a to_graph method to TransBuckets, so that the buckets can directly ↵Luke Kanies2007-09-123-331/+1
| | | | | | | | generate a graph, rather than having to first convert to RAL types and then have them convert to a graph. This allows us to make it so components do not need a @children array at all. This was all done because I am having the "already a parent of" problem again, and I have gotten far enough that it is relatively easy to just make this problem go away once and for all.
| * Another intermediate commit. The node and fact classes are now functional ↵Luke Kanies2007-09-128-139/+44
| | | | | | | | 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.
| * Refactoring the feature support so it loads libraries when a feature is ↵Luke Kanies2007-09-111-2/+0
| | | | | | | | asked about, rather than when it is defined.
| * The Node handler is now obsolete. Node searching is handled through the ↵Luke Kanies2007-09-112-660/+2
| | | | | | | | indirector. I have not yet added the tests for the node handlers themselves, which is next.
| * Doing an intermediate commit so rick can look at the work I have done so far.Luke Kanies2007-09-111-6/+10
| |
* | Merge branch 'testing'Luke Kanies2007-09-112-1/+27
|\ \ | |/ |/|
| * Removed TYPE token, replacing it with CLASSREF token, in the grammar and ↵Michael V. O'Brien2007-09-101-1/+19
| | | | | | | | lexer. Updated CLASSREF token regex in the lexer.
| * Fixed #774, which fixed fully qualified collection statementsMichael V. O'Brien2007-09-101-0/+8
| |
* | Renaming the instance loader method to "instance_load". It was previously ↵Luke Kanies2007-09-101-4/+4
|/ | | | autoload, which could class with Kernel.autoload.
* *Finally* fixing the tests that were failing around users and groups. The ↵Luke Kanies2007-09-075-35/+10
| | | | problem was that the autoload tests were somehow clearing all loaded classes, including the providers. This is fixed now.
* Fixing some failed tests. Mostly cleanup. Next is to make all of the user ↵Luke Kanies2007-09-079-212/+51
| | | | tests pass again, dammit.
* Fixing a path test. I have now made the path stuff a lot cleaner, but it ↵Luke Kanies2007-09-071-1/+1
| | | | apparently broke this test.
* Fixing #801 -- resources that have changes when running in noop mode do not ↵Luke Kanies2007-09-071-2/+19
| | | | record that they were checked, so that they will be scheduled on the next run. This is a somewhat murky solution, but considering that no one had submitted this bug before, I expect it will not hit many people.
* Fixing some broken tests in the master client, and adding a test for #800 ↵Luke Kanies2007-09-061-23/+30
| | | | but it is unfortunately disabled because we cannot realistically fix it using the current design. It will be easy after the REST refactor, though.
* Fixing #795 -- configuration elements now make sure all file paths are fully ↵Luke Kanies2007-09-061-1/+16
| | | | qualified by prepending the wd to unqualified path names.
* Fixing #802 -- tags are now applied before parent classes are evaluated, so ↵Luke Kanies2007-09-062-4/+25
| | | | parent classes can use tagged() to test if a node is a member of a subclass.
* Renaming some ast resource classes and files so they make a lot more sense.Luke Kanies2007-09-064-9/+9
|
* Fixing #806. Resources correctly look up their fully qualified definition ↵Luke Kanies2007-09-061-0/+59
| | | | type, just like resource references do, which causes the resource and reference to again agree on the full name of a given defined type.
* Flipped the switch so that compiles now return a Configuration instance ↵Luke Kanies2007-09-047-40/+20
| | | | instead of pre-extracting the configuration.
* Successfully modified all tests and code so that all language tests pass ↵Luke Kanies2007-09-0411-293/+278
| | | | again. This is the majority of the work necessary to make the separate "configuration" object work.
* We now have a real configuration object, as a subclass of GRATR::Digraph, ↵Luke Kanies2007-09-045-123/+16
| | | | that has a resource graph including resources for the container objects like classes and nodes. It is apparently functional, but I have not gone through all of the other tests to fix them yet. That is next.
* More refactoring. I have removed a few more extraneous methods from Scope, ↵Luke Kanies2007-09-035-58/+17
| | | | mostly just pointing directly to the compile, and I have begun (but commented out) the move to having resources to model each of the classes and nodes, in addition to the definitions. This will, again, enable a real Configuration object, and it will enable class versioning and similar features.
* Removing the Scope#setresource method, since it was essentially redundant. ↵Luke Kanies2007-09-032-11/+9
| | | | The work is done in either AST::ResourceDef#evaluate or Compile#store_resource.
* Doing a small amount of refactoring, toward being able to use Parser ↵Luke Kanies2007-09-034-203/+43
| | | | resources to evaluate classes and nodes, not just definitions. This will hopefully simplify some of the parsing work, and it will enable the use of a Configuration object that more completely models a configuration.
* Deleting old documentation that somehow made it back into the tree in the ↵Luke Kanies2007-09-016-9/+187
| | | | switch to git, and refactoring the evaluate_classes method on the compile object so I can use resources as intermediaries, thus making classes do late-binding evaluation.
* Fixing some failing unit tests.Luke Kanies2007-08-283-33/+8
|
* Making a couple of small bugfixes in the configuration subsystemLuke Kanies2007-08-271-13/+10
|
* Adding support for providing a diff when files are being changed. Currently ↵Luke Kanies2007-08-271-1/+0
| | | | uses a local diff binary, but could easily be changed to use the ruby diff/lcs library. Modified puppet and puppetd to automatically show file diffs when in noop mode, but can otherwise be enabled using --show_diff. This only works when running interactively, because the diffs are printed on stdout.
* Multiple environment support now works, and I have even tested it in real ↵Luke Kanies2007-08-262-10/+14
| | | | life. This commit is mostly a bug-fix commit, resulting from the difference between real-life testing and unit testing.
* The fileserver now uses an environment-specific module path. I also made ↵Luke Kanies2007-08-263-7/+8
| | | | various bug fixes around the network tree.