summaryrefslogtreecommitdiffstats
path: root/test/language
Commit message (Collapse)AuthorAgeFilesLines
...
* Theoretically, this patch is to fix #917 (which it does), butLuke Kanies2007-11-286-23/+23
| | | | | | | | | | | | | | | | | | | 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 the first half of #917 -- the ResourcReferenceLuke Kanies2007-11-281-0/+12
| | | | | | AST code now correctly finds the resource. It's getting lost in the configuration translation, though, so I need to fix that, too.
* Incorporating patch ↵Luke Kanies2007-11-241-178/+0
| | | | | | | | | | 20071030034736-6856b-6004090b3968cdbf7d366a03ee1c44e2160a3fe0.patch from womble, and rewriting and significantly enhancing the unit tests for the Puppet::Parser::Collector class; it should have full coverage now. There are no integration tests for it, so there's still no guarantee that it works at all, but hey, we're a lot better off than we were.
* Fixing a couple of tests that were failing because of the environment changes.Luke Kanies2007-11-231-0/+1
|
* Fixing a failing test from my fix for #446 -- I had changedLuke Kanies2007-11-191-14/+0
| | | | | | the behaviour of Resource#override_parameter unintentionally. I've corrected the comments so it's clear why the original behaviour was there.
* Reverting the changes I'd made toward removing the globalLuke Kanies2007-11-191-11/+12
| | | | | | | | resources. These are commits: c19835ce9f8a5138b30a1a32ca741c996b0916d2 9290cc89a2206fb5204578f8e91208857a48b147 ffb4c2dbc7314b364d25e4f7be599ef05b767b44
* Fixed most failing tests, but there are still over thirty failing.Luke Kanies2007-11-181-12/+11
| | | | | | 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 a parser test -- really, just removing testsLuke Kanies2007-11-131-17/+3
| | | | | | | | that belong with the AST classes rather than in the parser. Yeah, these tests need to be rewritten. Committed on an airplane. :)
* Fixing #800 by refactoring how configurations are retrievedLuke Kanies2007-11-121-0/+1
| | | | | | | | | 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.
* Moving some compile tests to the spec/ directory, andLuke Kanies2007-11-121-73/+0
| | | | | | | | | | | | switching the node scope to no longer be lazy evaluation, just like I switched 'main'. When I made all of these classes and nodes lazy evaluated, I should have decoupled my real goal (using resources to evaluate them) from the idea of lazy-evaluating them, and this basically does that. I also changed the scope heirarchy slightly so that scopes will tend to be below the node scope, altho this was already generally the case.
* Changing the 'main' class to no longer be lazy-evaluated.Luke Kanies2007-11-121-5/+8
| | | | | It was getting evaluated after node classes, which caused even stranger ordering issues.
* Switching the class resource evaluation to only happenLuke Kanies2007-11-081-1/+1
| | | | | when using :include, not (for example) when evaluating node classes.
* Classes once again get evaluated immediately when theLuke Kanies2007-11-082-52/+2
| | | | | | | | | | 'include' function is used, instead of being lazy-evaluated. Previous work caused resources to get created to model these classes, but in the process, I removed the fact that the classes were evaluated immediately. This meant that you couldn't guarantee that a class was evaluated before you went to use its variables.
* Changing the test/ classes so that they work from the mainLuke Kanies2007-10-2617-17/+17
| | | | | | test/ dir or from their own working dir, like the specs do. This was just a question of changing how their libraries are loaded.
* All tests should now pass again.Luke Kanies2007-10-082-29/+9
| | | | | | | | | | | | | | 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.
* Adding a :code setting for specifying code to runLuke Kanies2007-10-053-18/+6
| | | | | | | | 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-052-41/+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.
* Removing the Id tags from all of the filesLuke Kanies2007-10-038-8/+0
|
* Merge branch 'indirection' of git://reductivelabs.com/puppet-lukeLuke Kanies2007-09-251-12/+6
|\
| * Merge branch 'configurations' into indirectionLuke Kanies2007-09-221-11/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 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-221-9/+2
| |/ | | | | | | | | | | | | | | 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.
| * Another intermediate commit. The node and fact classes are now functional ↵Luke Kanies2007-09-121-3/+4
| | | | | | | | 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.
* | 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
|/
* *Finally* fixing the tests that were failing around users and groups. The ↵Luke Kanies2007-09-074-9/+9
| | | | 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-071-18/+19
| | | | tests pass again, dammit.
* 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-063-6/+6
|
* 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-045-24/+19
| | | | instead of pre-extracting the configuration.
* Successfully modified all tests and code so that all language tests pass ↵Luke Kanies2007-09-049-290/+275
| | | | 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.
* And we have multiple environment support in the parser. The only remaining ↵Luke Kanies2007-08-257-36/+36
| | | | piece to make this complete is to add multiple environment support to the fileserver. I also renamed Configuration.rb to Compile.rb (that is, I fixed all the classes that used to know it as a configuration).
* Renaming the "configuration" object to "compile", because it is only a ↵Luke Kanies2007-08-251-15/+15
| | | | 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-233-163/+24
| | | | 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).
* Fixing the integration test between interpreter and configuration -- the ↵Luke Kanies2007-08-221-1/+1
| | | | interpreter was not passing on that the config should use ast nodes
* The last commits before I actually start on the multi-environment support. ↵Luke Kanies2007-08-221-1/+1
| | | | There are still failing tests, but apparently only those that are also failing in trunk.
* All language tests now pass. I expect there are other failures elsewhere, ↵Luke Kanies2007-08-2011-620/+269
| | | | 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-206-529/+347
| | | | 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.
* The new parser configuration object works now,Luke Kanies2007-08-161-21/+606
| | | | | | | | | | | | | | but the rest of the compiling process is hosed (although the parser itself should still be fine). The configuration object is unifying a lot of work that was scattered around either the interpreter or the scopes, and it simplifies the whole system. However, its new simplicity has made the complexity of the rest of the system that much more apparent, and I am resolved to fixing the system rather than hacking it sufficiently to just make it work.
* Finalizing the node handler. It now correctly uses the different node sourcesLuke Kanies2007-08-141-131/+0
| | | | | 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-143-380/+237
| | | | | | | | 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.
* Applying patch by Adam Jacob to make external node tools able to handle ↵Luke Kanies2007-08-131-3/+15
| | | | command-line arguments
* Fixing #314 and #729; here's the changelog:luke2007-08-033-439/+468
| | | | | | | | | | | | | | | 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
* Removing test that ended up being redundantluke2007-07-311-16/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2730 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding the ability to specify relationships to classes, using Class[name] ↵luke2007-07-192-1/+43
| | | | | | resource references. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2715 980ebf18-57e1-0310-9a29-db15c13687c0