summaryrefslogtreecommitdiffstats
path: root/test/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Renaming the 'Puppet::Util::Config' class toLuke Kanies2007-09-221-2/+2
| | | | | | | '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-5/+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-153-69/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-122-41/+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-124-22/+33
| | | | 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.
* Doing an intermediate commit so rick can look at the work I have done so far.Luke Kanies2007-09-111-6/+10
|
* Fixing some failed tests. Mostly cleanup. Next is to make all of the user ↵Luke Kanies2007-09-071-6/+6
| | | | tests pass again, dammit.
* Renaming some ast resource classes and files so they make a lot more sense.Luke Kanies2007-09-061-3/+3
|
* Flipped the switch so that compiles now return a Configuration instance ↵Luke Kanies2007-09-042-16/+1
| | | | instead of pre-extracting the configuration.
* Successfully modified all tests and code so that all language tests pass ↵Luke Kanies2007-09-042-3/+3
| | | | again. This is the majority of the work necessary to make the separate "configuration" object work.
* Renaming the "configuration" object to "compile", because it is only a ↵Luke Kanies2007-08-251-2/+2
| | | | transitional object and I want the real "configuration" object to be the thing that I pass from the server to the client; it will be a subclass of GRATR::Digraph.
* Everything up to the parser (and the Modules) is ready to support multiple ↵Luke Kanies2007-08-231-1/+2
| | | | environments, including the parser having an environment setting. I have also created my first spec-based tests, for the interpreter (and deleted the old test/unit tests).
* Building a stand-alone spec directory for creating the new spec-based tests.Luke Kanies2007-08-2378-5961/+0
|
* Adding the second half of the rspec upgrade -- apparently the "git add" ↵Luke Kanies2007-08-2322-1417/+0
| | | | thing I used did not remove the old files, only add the new ones.
* Upgrading rspec to version 1.0.8. This only includes the contents of the ↵Luke Kanies2007-08-2369-798/+3081
| | | | lib directory, and even then only the spec-related stuff, not the autotest stuff.
* Merging the multi_env branch with master. There are not actually any ↵Luke Kanies2007-08-221-28/+28
|\ | | | | | | conflicts, so this commit might only be necessary because I did not pull sufficiently often.
| * Fixing the spec library so it correctly can see its versionLuke Kanies2007-08-161-29/+29
| |
* | A round of bugfixing. Many more tests now pass -- I think we are largely ↵Luke Kanies2007-08-204-9/+7
| | | | | | | | down to tests that (yay!) fail in trunk.
* | All language tests now pass. I expect there are other failures elsewhere, ↵Luke Kanies2007-08-202-6/+7
| | | | | | | | but I want to commit this before delving into them. My method for fixing the tests was to do as little as possible, keeping the tests as bad or as good as they were before I started. Mostly this was about changing references to the interpreter into references to the parser (since that is where the new* methods are now for ast containers) and then dealing with the new config object and its relationship to scopes.
* | The first pass where at least all of the snippet tests pass. I have ↵Luke Kanies2007-08-202-32/+35
| | | | | | | | 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.
* | Requiring mocha in all cases in the test treeLuke Kanies2007-08-151-0/+1
|/
* Upgrade mocha to 0.5.1, which gives much better error messages(no author)2007-08-0928-228/+892
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2758 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #314 and #729; here's the changelog:luke2007-08-032-2/+2
| | | | | | | | | | | | | | | Refactored how the parser and interpreter relate, so parsing is now effectively an atomic process (thus fixing #314 and #729). This makes the interpreter less prone to error and less prone to show the error to the clients. Note that this means that if a configuration fails to parse, then the previous, parseable configuration will be used instead, so the client will not know that the configuration failed to parse. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2742 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #703, mostly. You still cannot do multi-condition queries, but you ↵luke2007-07-181-1/+1
| | | | | | can at least query against any parameter, and matching any value is sufficient for a match, so the tags work fine. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2705 980ebf18-57e1-0310-9a29-db15c13687c0
* All rails and language tests now pass again. All of the rails tests should ↵luke2007-06-171-0/+30
| | | | | | now be in the rails/ directory, and I have modified resource translation so that it always converts single-member arrays to singe values, which means the rails collection does not need to worry about it. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2597 980ebf18-57e1-0310-9a29-db15c13687c0
* Added the teardown of the database back to the tests. ballman2007-06-121-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2567 980ebf18-57e1-0310-9a29-db15c13687c0
* Major rework of the rails feature. Changed the relationship between ballman2007-06-121-1/+1
| | | | | | | | | | | | | | | | host and facts (now many-to-many with fact_name through fact_values). Also changed the relationship between resource and params (similarly many-to-many with param_names through param_values). Added the resource_tags and puppet_tags. The latter has the tag names and the former is the man-to-many link with resources. There is a little clean up left but the schema is in order. Also a test for the tags stuff is required. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2565 980ebf18-57e1-0310-9a29-db15c13687c0
* Finishing off the type/provider interface work, including adding package ↵luke2007-06-081-0/+11
| | | | | | prefetch for all packages. The only not-done one is yum -- prefetch is set up for rpm, but not yum. We need to modify prefetching so that it also prefetches latest information, to avoid having to run yum so many times. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2555 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #323 -- puppetd and puppetmasterd are now in sbin; packages still ↵luke2007-05-201-0/+7
| | | | | | need to be fixed git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2529 980ebf18-57e1-0310-9a29-db15c13687c0
* Redoing autoload a bit in preparation for adding a plugindirluke2007-05-161-0/+13
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2518 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #605 -- providers now refer to @resource or @resource_type.luke2007-05-091-28/+28
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2501 980ebf18-57e1-0310-9a29-db15c13687c0
* Merging of refactor-transacton to the trunk. This work removes the :is ↵ballman2007-05-091-2/+2
| | | | | | attribute from properties and relies on the provider to cache or return the current value of the property. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2487 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a "supports_parameter?" method to test whether a given provider ↵luke2007-05-011-0/+4
| | | | | | supports the features required by a given parameter. This is used during attribute instance creation, but its creation was necessicated by test code. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2444 980ebf18-57e1-0310-9a29-db15c13687c0
* Hah! Finally fixing the problem where mount tests would fail when run as ↵luke2007-03-311-1/+3
| | | | | | part of the whole suite. The real problem was that I was changing the filetype of the provider without setting it to change back after the test, but the key change that made it straightforward to fix this problem was that my test loader was not exiting with a non-zero code when there was a failure, which mean that the ./test script never thought anything failed. I fixed the former, then fixed the test script to work fine with -n method_name stuff, and quickly found the problem. *whew* git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2377 980ebf18-57e1-0310-9a29-db15c13687c0
* The first round of fixes for failing tests.luke2007-03-181-0/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2296 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #542. Transactions now cause services to warn when they would have ↵luke2007-03-171-1/+1
| | | | | | gotten restarted by a noop resource. Also fixing #549 -- transactions now only refuse to delete required resources if they are being purged. All other resources can be deleted just fine. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2286 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding spec libs, so we can use them some dayluke2007-03-1773-0/+5095
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2283 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding some more testing on the @should values for :groups on users, and ↵luke2007-03-081-2/+3
| | | | | | fixing a bug that often made :groups think it was out of sync. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2267 980ebf18-57e1-0310-9a29-db15c13687c0
* Merging the webserver_portability branch from version 2182 to version 2258.luke2007-03-065-8/+72
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2259 980ebf18-57e1-0310-9a29-db15c13687c0
* Partially complete #241. Add a 'purged' value for Package.ensure, and add a ↵mpalmer2007-02-2320-0/+1020
| | | | | | handler for all of the Debian providers. Also wrote sensible test cases, and so we've now got Mocha running around in our source tree. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2223 980ebf18-57e1-0310-9a29-db15c13687c0
* Revamping collections to get what is hopefully more reasonable behaviour ↵luke2007-02-161-0/+6
| | | | | | when they are used in combination with defined resource types. You should now be able to combine them in just about any way and get "correct" behaviour, which in this case means that you can have virtual definitions or definitions wrapping virtual resources and the resources will still all get realized. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2198 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #484. Moving unit tests at the same time.luke2007-02-081-0/+5
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2181 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving all of the client and server code into a single network/ directory. ↵luke2007-02-081-1/+1
| | | | | | In other words, more code structure cleanup. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2179 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving some of the stand-alone classes into the util/ subdirectory, to clean ↵luke2007-02-074-17/+17
| | | | | | up the top-level namespace a bit. This is a lot of file modifications, but most of them just change class names and file paths. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2178 980ebf18-57e1-0310-9a29-db15c13687c0
* Merging the state-rename branch. This includes the diff from version 2156 ↵luke2007-02-071-8/+8
| | | | | | to 2168. All states should now be properties, with backward compatibility for the types that restricted themselves to the methods. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2169 980ebf18-57e1-0310-9a29-db15c13687c0
* The resolve functionality in "test" is almost working...luke2007-02-012-14/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2149 980ebf18-57e1-0310-9a29-db15c13687c0
* Oops, that last commit seems to have broken the rakefile. Works again.luke2007-02-012-11/+10
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2147 980ebf18-57e1-0310-9a29-db15c13687c0
* Trying to get the functionality I had in previous tests. Mostly I wantluke2007-02-012-1/+62
| | | | | | | | | | | | | | | | | | to be able to load many files but run just a couple of methods, which test/unit supports via -n, selectively enabling -d. I now can do this with the Rakefile, using 'TESTOPTS="-n <method> -d" rake <blah>, although I find that a bit kludgy (certainly more so than 'rake -n <blah> -d <blah>'). However, I also want to be able to automatically determine which test suites conflict (meaning something in one suite causes a failure in another), which too-often happens. So, I'm going to mess around some with 'test' until I get that, and then see if I can move that functionality to the rakefile. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2146 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing executable tests to take new rundir into accountluke2007-02-011-0/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2145 980ebf18-57e1-0310-9a29-db15c13687c0
* Fix to make running tests work in ruby 1.8.5lutter2007-02-011-3/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2143 980ebf18-57e1-0310-9a29-db15c13687c0