summaryrefslogtreecommitdiffstats
path: root/spec/unit/node
Commit message (Collapse)AuthorAgeFilesLines
...
* Adding REST::Handler methods for converting between indirection and urisLuke Kanies2009-03-201-0/+4
| | | | | | | | | | This is the first main phase to having a common module for handling the REST api - this Handler module will be included by all of the web server REST modules and the Indirector Request class, so there's a common place that understands how the URI consists. Signed-off-by: Luke Kanies <luke@madstop.com>
* Environments now use their own modulepath method.Luke Kanies2009-02-181-3/+3
| | | | | | They were previously still using just the variable itself. Signed-off-by: Luke Kanies <luke@madstop.com>
* The 'Environment' class can now calculate its modulepath.Luke Kanies2009-02-181-0/+42
| | | | | | | | | | | This includes adding PUPPETLIB from the shell environment. I'm moving responsibility for this from the Module class, because nearly every method in Puppet::Module accepted 'environment' as its argument, which is a good sign that it's on the wrong class. Signed-off-by: Luke Kanies <luke@madstop.com>
* Added support for finding modules from an environmentLuke Kanies2009-02-181-0/+38
| | | | | | | | This uses the environment to search for the modules, rather than relying on the Puppet::Module class to know how to handle environments. Signed-off-by: Luke Kanies <luke@madstop.com>
* reformatting the environment testsLuke Kanies2009-02-181-15/+15
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Refactoring how the Facter integration worksLuke Kanies2009-02-061-0/+55
| | | | | | | | I moved all of the extra Fact modifications into the Facts class, and then moved the calls of those new methods into the Facter terminus. Signed-off-by: Luke Kanies <luke@madstop.com>
* Reformatting tests for factsLuke Kanies2009-02-061-30/+32
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Renaming Puppet::Node::Catalog to Puppet::Resource::CatalogLuke Kanies2008-12-181-932/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Merge branch '0.24.x'Luke Kanies2008-12-021-9/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/puppetca lib/puppet/type/group.rb lib/puppet/type/tidy.rb lib/puppet/util/settings.rb Also edited the following files so tests will pass: lib/puppet/type/component.rb spec/unit/ssl/certificate_request.rb spec/unit/type/computer.rb spec/unit/type/mcx.rb spec/unit/type/resources.rb spec/unit/util/settings.rb spec/unit/util/storage.rb test/ral/type/zone.rb
| * Removing the included testing gems; you must now install them yourself.Luke Kanies2008-11-251-9/+9
| | | | | | | | | | | | Everything passes, but autotest doesn't include color. Signed-off-by: Luke Kanies <luke@madstop.com>
* | These changes are all about making sure file data is expired when appropriate.Luke Kanies2008-11-151-2/+2
| | | | | | | | | | | | All file tests now pass. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Catalogs always consider resource data to be expired if not mid-transaction.Luke Kanies2008-11-151-0/+11
| | | | | | | | | | | | | | | | | | This way we'll cache when in a transaction, but otherwise always hit the disk so the data is fresh. This works because we really only use resources mid-transaction, but it behaves correctly if we happen to use a resource outside of a transaction. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding cached attribute support to resources.Luke Kanies2008-11-111-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | The Catalog is the expirer, which means that a resource with no catalog will not cache data. Also switching files to use a cached attribute for its stat. And modifying catalogs to expire data at the end of every transaction. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Changing the Cacher.invalidate method to Cacher.expire.Luke Kanies2008-11-112-3/+3
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Refactoring Catalog#add_resource to correctly handle implicit resources.Luke Kanies2008-11-071-71/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It now ignores or removes implicit resources that conflict, and it yields all resources that are valid. This makes it simple for calling classes to pass in a list of resources but only perform a chunk of work for valid (i.e., non-conflicting) resources. This refactor is entirely meant as a way of cleaning up the Transaction#generate interface to the catalog. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Changing the catalog's relationship graph into a normal graph.Luke Kanies2008-11-061-67/+74
| | | | | | | | | | | | | | It was previously another catalog instance, but I was only ever actually using the graphing abilities. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Removing the PGraph class and subsuming it into SimpleGraph.Luke Kanies2008-11-061-20/+2
| | | | | | | | | | | | | | This class is a holdover from when I was using GRATR, and it's obsolete now. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Removing mid-transaction resources from the catalog.Luke Kanies2008-11-051-0/+14
| | | | | | | | | | | | This basically just cleans up dynamic resources. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x' Removed the 'after' blocks that call Type.clear,Luke Kanies2008-10-171-52/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | since that method is deprecated. Conflicts: CHANGELOG bin/puppetca lib/puppet/file_serving/fileset.rb lib/puppet/network/xmlrpc/client.rb lib/puppet/type/file/selcontext.rb spec/unit/file_serving/metadata.rb spec/unit/type/file.rb
| * Fixing #1614 - Environments no longer have to be listed out.Luke Kanies2008-10-031-52/+0
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x'Luke Kanies2008-07-041-1/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/util/settings.rb spec/integration/defaults.rb spec/unit/node/catalog.rb spec/unit/type/interface.rb spec/unit/type/ssh_authorized_key.rb
| * Backporting a test that was failing in master, and fixing itLuke Kanies2008-07-021-0/+5
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x'Luke Kanies2008-07-021-0/+5
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: CHANGELOG spec/unit/node/catalog.rb spec/unit/type/package.rb spec/unit/type/schedule.rb spec/unit/type/service.rb spec/unit/util/settings.rb
| * Fixed #1221 - aliases to titles now work for resources.Luke Kanies2008-06-161-3/+8
| |
* | Merge branch '0.24.x'Luke Kanies2008-05-251-0/+20
|\| | | | | | | | | | | | | Conflicts: CHANGELOG lib/puppet/transaction.rb
| * Fixing the node/catalog so that it can convert from parser catalogs to RAL ↵Luke Kanies2008-05-221-0/+20
| | | | | | | | | | | | | | | | | | | | catalogs. It largely worked previously, except when aliases were set, which require catalogs. This now converts all parser resources to trans_objects then to RAL resources, and sets the catalog in the meantime. This allows aliases to work just fine when converting directly from parser catalogs to RAL catalogs.
| * Fixing another test that wrote to ~Luke Kanies2008-05-121-0/+1
| |
* | Using the new Cacher class for handling cached data.Luke Kanies2008-05-132-9/+4
| | | | | | | | | | This provides a single, global bit for determining whether a given piece of cached data is still valid.
* | Fixing some tests that were insufficiently mocking their configurations.Luke Kanies2008-05-051-0/+1
| | | | | | | | These were still writing to ~.
* | Merge branch '0.24.x'Luke Kanies2008-04-112-5/+5
|\|
| * Intermediate commit.Luke Kanies2008-04-082-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a Request instance into the indirection, pushing it all the way to the terminus instances. It's a big commit because it requires modifying every terminus class. There are still some thorny design issues. In particular, who should be responsible for making the request object? I've tried having both the indirection class and the Indirector module creating it, and both have their issues. Also, the Catalog class previously allowed passing Node instances directly to the find method, which is now no longer possible because the Request class would treat the node as the instance being found. We need the request class to have two modes, one when it's passed an instance and one when it's passed a key.
* | Fixing tests that were failing as a result of the merge,Luke Kanies2008-04-011-4/+1
| | | | | | | | | | including removing some now-obsolete code and tests from the Settings class.
* | Merge branch 'master' into master_no_global_resourcesLuke Kanies2008-03-311-123/+148
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/node/catalog.rb lib/puppet/type/pfile.rb lib/puppet/type/pfilebucket.rb lib/puppet/util/filetype.rb spec/unit/node/catalog.rb spec/unit/other/transbucket.rb spec/unit/ral/provider/mount/parsed.rb spec/unit/ral/types/file.rb spec/unit/ral/types/interface.rb spec/unit/ral/types/mount.rb spec/unit/ral/types/package.rb spec/unit/ral/types/schedule.rb spec/unit/ral/types/service.rb test/language/compile.rb test/language/lexer.rb test/language/snippets.rb test/lib/puppettest.rb test/ral/types/basic.rb test/ral/types/cron.rb test/ral/types/exec.rb test/ral/types/file.rb test/ral/types/file/target.rb test/ral/types/filebucket.rb test/ral/types/fileignoresource.rb test/ral/types/filesources.rb test/ral/types/group.rb test/ral/types/host.rb test/ral/types/parameter.rb test/ral/types/sshkey.rb test/ral/types/tidy.rb test/ral/types/user.rb test/ral/types/yumrepo.rb
| * Fix for 1094Luke Kanies2008-03-061-0/+2
| | | | | | | | | | | | Replace the catalog with the newly created one when converting to ral types. The aliases were being lost because the resources had references to the old catalog being converted
| * Fixing #1084 -- the node catalog asks the individualLuke Kanies2008-02-251-3/+5
| | | | | | | | | | | | resources whether they're isomorphic, and they in turn ask the resource types (or default to true for defined resource types).
| * Somewhat refactored fileserving so that it no longer cachesLuke Kanies2008-02-231-3/+19
| | | | | | | | | | | | | | | | | | | | any objects, nor does it use Puppet's RAL resources. In the process, I fixed #894 (you can now copy links) and refactored other classes as necessary. Mostly it was fixing tests. This is a squashed commit of a temporary branch, fwiw, and it also includes any fixes to the tests that were necessary to get all tests passing again.
| * Merge branch 'my24' into 0.24.xRick Bradley2008-02-181-85/+82
| |\
| | * converting node catalog specs from setup/teardown to before/afterRick Bradley2008-02-181-85/+82
| | |
| * | Fixed #1018 -- resources now have their namevars added asLuke Kanies2008-02-181-0/+13
| |/ | | | | | | | | aliases in the resource catalog, just like they were added in the resource classes.
| * Removing the last remaining vestiges of GRATR --Luke Kanies2008-02-111-24/+24
| | | | | | | | removing the bangs from 'add_vertex!' and 'add_edge!'.
| * Switching the Node Catalog to using a separate methodLuke Kanies2008-02-111-0/+6
| | | | | | | | | | | | for validating that a given resource is unique within the catalog. This no longer allows any duplication, even with Execs.
| * Changing the name of the Compile class to Compiler,Luke Kanies2008-02-111-3/+3
| | | | | | | | | | since it's stupid to have a class named after a verb.
* | Fixing automatic relationships. I was previously looking themLuke Kanies2008-01-141-1/+9
| | | | | | | | | | up in the relationship graph, which only stores the vertices, not the resource table.
* | Another round of fixes toward making global resources work.Luke Kanies2008-01-091-17/+40
|/ | | | | | The only remaining failures are more complicated ones (which I'll need to not be on a plane to debug, for battery reasons) or those related to the broken directory_service providers.
* Further fixes toward #965. Turned out that the previous fixLuke Kanies2007-12-211-117/+131
| | | | | | | caused other problems. This whole thing will hopefully get *drastically* easier once we get rid of global resources.
* Renaming 'configuration' to 'catalog', fixing #954.Luke Kanies2007-12-111-84/+84
|
* Fixing #951 -- external nodes work again, but you have toLuke Kanies2007-12-101-79/+0
| | | | set the 'node_terminus' setting to 'exec'.
* Theoretically, this patch is to fix #917 (which it does), butLuke Kanies2007-11-281-0/+12
| | | | | | | | | | | | | | | | | | | there were enough problems fixing it that I decided something more drastic needed to be done. This uses the new Puppet::ResourceReference class to canonize what a resource reference looks like and how to retrieve resources via their references. Specifically, it guarantees that resource types are always capitalized, even when they include '::' in them. While many files are modified in this commit, the majority of changes are quite small, and most of the changes are fixing the tests to use capitalized types. As we look at consolidating some of our resource types, we could consolidate the ResourceReference stuff at the same time, but at least the Puppet::Parser::ResourceReference class subclasses the main Puppet::ResourceReference class.
* Fixing #931 by keeping track in configurations ofLuke Kanies2007-11-271-0/+22
| | | | | | | | | | what transportable resources get converted to, so different names don't throw it off. I also got rid of the Puppet::Type#merge method, which has been deprecated for ages but was still in there. I had to fix a few tests that weren't cleaning up after themselves as a result.
* Using the Environment class to determine the default environment,Luke Kanies2007-11-202-136/+4
| | | | | rather than plenty of different places having the logic of how to determine the default environment.