summaryrefslogtreecommitdiffstats
path: root/test/network
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fixed most failing tests, but there are still over thirty failing.Luke Kanies2007-11-184-90/+14
| | | | | | | | | | | | At this point, I'm holding the experiment until after the release, so I'm committing this for now and will take it back up after 0.24.0 is out.
* | Fixing #800 by refactoring how configurations are retrievedLuke Kanies2007-11-124-237/+55
|/ | | | | | | | | from the server. The real problem was getting all of the validation done before any caching, which required a good bit more refactoring than I expected. In actuality, this commit is relatively small even though it covers many files; most of the changes just make the code clearer or shorter.
* Changing the test/ classes so that they work from the mainLuke Kanies2007-10-2626-26/+26
| | | | | | test/ dir or from their own working dir, like the specs do. This was just a question of changing how their libraries are loaded.
* Translating the report handler to an indirected model.Luke Kanies2007-10-131-102/+1
| | | | | | | | | | | I've provided backward compatibility with the old handler. The only terminus type that currently exists for reports is the 'code' terminus, which is used to process reports in the style of the old handler. At some point, we should likely switch at least some of these report types (e.g., 'store') to terminus types.
* Merge branch 'master' of git://michaelobrien.info/puppet into michaelLuke Kanies2007-10-095-38/+25
|\
| * All tests should now pass again.Luke Kanies2007-10-084-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first real pass towards using caching. The `puppet` executable actually uses the indirection work, instead of handlers and such (and man! is it cleaner). Most of this work was a result of trying to get the client-side story working, with correct yaml caching of configurations, which means this commit also covers converting configurations to yaml, which was a much bigger PITA than it needed to be. I still need to write integration tests, and I also need to cover the server-side story of a normal configuration retrieval.
| * Another round of test-fixing around the changes I madeLuke Kanies2007-10-053-16/+9
| | | | | | | | | | | | | | | | | | to the configuration system. 'puppet' itself still works, even with -e, but I expect that puppetd and puppetmasterd are broken, and there are still quite a few broken tests because the default fact store can't write but that's the default behaviour for a networked configuration master.
* | Moving the webrick/mongrel "servers" over to HTTPServer module instead of ↵Rick Bradley2007-10-053-6/+6
|/ | | | 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.
* Removing the Id tags from all of the filesLuke Kanies2007-10-0324-24/+0
|
* 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-021-0/+7
| | | | they were there: Added set_mygroup method, removed duplicate setme method. Included PuppetTest in the XMLRPC servlect test.
* Renaming the 'Puppet::Util::Config' class toLuke Kanies2007-09-224-6/+6
| | | | | | | '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".
* This is basically another intermediate commit. I feel likeLuke Kanies2007-09-171-4/+5
| | | | | | | | | | | | | | | | | | | | 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-151-49/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Another intermediate commit. The node and fact classes are now functional ↵Luke Kanies2007-09-123-114/+7
| | | | 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.
* 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.
* Fixing some failed tests. Mostly cleanup. Next is to make all of the user ↵Luke Kanies2007-09-071-1/+4
| | | | tests pass again, dammit.
* 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 some failing unit tests.Luke Kanies2007-08-281-4/+5
|
* 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.
* Adding environment information to the client fact list. The environment is ↵Luke Kanies2007-08-221-0/+10
| | | | retrieved from the normal Puppet configuration, so it is set via puppet.conf or the cli, rather than being a normal fact.
* The last commits before I actually start on the multi-environment support. ↵Luke Kanies2007-08-222-68/+2
| | | | There are still failing tests, but apparently only those that are also failing in trunk.
* Adding the topscope metadata to the configuration being returned to the ↵Luke Kanies2007-08-222-7/+2
| | | | client, just like it expects, and fixing how the resource handler calls the master type.
* A round of bugfixing. Many more tests now pass -- I think we are largely ↵Luke Kanies2007-08-203-105/+31
| | | | down to tests that (yay!) fail in trunk.
* The first pass where at least all of the snippet tests pass. I have ↵Luke Kanies2007-08-201-74/+0
| | | | unfortunately had to stop being so assiduous in my rewriting of tests, but I am in too much of a time crunch to do this "right". The basic structure is definitely in place, though, and from here it is a question of making the rest of the tests work and hopefully writing some sufficient new tests, rather than making the code itself work.
* Adding node caching, so that node sources are not spammed during file ↵Luke Kanies2007-08-151-1/+24
| | | | serving and such
* Keeping the node names in the node object, so that they are available to the ↵Luke Kanies2007-08-151-0/+3
| | | | interpreter
* Refactoring a small part of the interface between the configuration handler ↵Luke Kanies2007-08-151-2/+24
| | | | and the interpreter.
* The new configuration handler looks to be ready for usage. Now I just need ↵Luke Kanies2007-08-151-0/+167
| | | | to convert the interpreter to use SimpleNode objects, then continue with the Configuration object.
* Adding the necessary name/ip fields to the node methodsLuke Kanies2007-08-151-1/+1
|
* Adding a "none" node source, which will be the default node source and will ↵Luke Kanies2007-08-151-0/+18
| | | | just return an empty node.
* Finalizing the node handler. It now correctly uses the different node sourcesLuke Kanies2007-08-141-6/+324
| | | | | and knows how to retrieve data from those sources. Now I just need to fix the language stuff to use this handler instead of the existing node stuff.
* An intermediate commit in the work towards adding multi-environment support.Luke Kanies2007-08-141-0/+341
| | | | | | | | This has required splitting the interpreter up considerably, which is much cleaner but is a large project. There is now a 'nodes' handler, but it is currently non-functional, although all the support structure is there. It just needs to have the individual methods fleshed out, and it needs to be connected to the 'facts' handler.
* Trivial mock cleanups(no author)2007-08-091-2/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2763 980ebf18-57e1-0310-9a29-db15c13687c0
* Refactor SUIDManager tests to run without root, change SUIDManager's ↵christian2007-08-097-0/+26
| | | | | | behavior to not silently fail when it's not root and fix all other tests that broke as a result. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2759 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding test support for the other mongrel configuration headerluke2007-08-061-2/+23
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2752 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #621 -- plugins are now downloaded directly into the $libdir, and ↵luke2007-07-101-38/+13
| | | | | | autoload looks for them there. You can now easily download any reloadable file to your clients. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2669 980ebf18-57e1-0310-9a29-db15c13687c0
* Making sure that #686 is fixed -- I specifically included the Daemon module ↵luke2007-07-081-0/+6
| | | | | | in the Puppet mongrel server, and I call daemonize on the Puppet class, rather than the Mongrel http server git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2659 980ebf18-57e1-0310-9a29-db15c13687c0
* Hopefully fixing #685 -- I added a wrapper around the call to getconfig(), ↵luke2007-07-081-3/+12
| | | | | | so any timeouts will just throw an error and skip the run, rather than failing and killing the daemon. This is not the best approach, since really, each method should be wrapped, but it is sufficient. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2658 980ebf18-57e1-0310-9a29-db15c13687c0
* Removing the long-obsolete Element base class. The Parameter and Type ↵luke2007-07-041-0/+2
| | | | | | classes no longer have the same base class. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2647 980ebf18-57e1-0310-9a29-db15c13687c0
* Modified the fileserver to cache file information, so thatluke2007-06-191-0/+2
| | | | | | | | | each file isn't being read on every connection. Also, added londo's patch from #678 to avoid reading entire files into memory. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2629 980ebf18-57e1-0310-9a29-db15c13687c0
* More test fixes. I seem to be getting very close.luke2007-06-192-0/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2624 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing some failing tests.luke2007-06-181-47/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2616 980ebf18-57e1-0310-9a29-db15c13687c0
* Modifying the CA server so that it will not send back a cert whose public ↵luke2007-06-182-0/+36
| | | | | | key does not match the csr. We have been getting a lot of instances of this, so this should cut down that problem. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2612 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #578 -- Invalid certs are no longer written to disk.luke2007-06-181-0/+24
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2611 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing mongrel test so it does not try to load the mongrel server class on ↵luke2007-06-131-1/+0
| | | | | | machines without mongrel git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2570 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a simple unit test for mongrel, and adding the ability to select the ↵luke2007-06-112-1/+67
| | | | | | header used to store the client SSL dn. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2558 980ebf18-57e1-0310-9a29-db15c13687c0
* Significantly reworked the type => provider interface with respect toluke2007-06-041-3/+3
| | | | | | | | | | | | | | | | | | | | listing existing provider instances. The class method on both class heirarchies has been renamed to 'instances', to start. Providers are now expected to return provider instances, instead of creating resources, and the resource's 'instances' method is expected to find the matching resource, if any, and set the resource's provider appropriately. This *significantly* reduces the reliance on effectively global state (resource references in the resource classes). This global state will go away soon. Along with this change, the 'prefetch' class method on providers now accepts the list of resources for prefetching. This again reduces reliance on global state, and makes the execution path much easier to follow. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2551 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #532 -- reparsing config files no longer throws an exception. The ↵luke2007-05-311-0/+17
| | | | | | | | problem only occurred when reparsing a configuration file that was also being managed (which was common) and only whent the manifest was up to date (the combination was uncommon). Reparsing would find the existing file object and use it to check permissions and such, then it would remove all of the internal data in the object, for cleanup; the problem is, the client still had a reference to the object, so when it went to run its configuration, this broken reference was used. The solution I chose was to remove all objects from memory after every run. It is negligible to reload them from the cache, and it saves ram for the 99% of the time that the client is just sitting there. And it makes this problem go away. :) git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2545 980ebf18-57e1-0310-9a29-db15c13687c0