summaryrefslogtreecommitdiffstats
path: root/test/network
Commit message (Collapse)AuthorAgeFilesLines
* Supressing warnings (not really failures) in test/unitJesse Wolfe2010-02-171-9/+15
|
* Migrating Handler base tests from test/ to spec/Luke Kanies2009-08-021-63/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Migrating tests to spec and removing an obsolete testLuke Kanies2009-08-021-70/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fix #2348 - Allow authstore (and REST auth) to match allow/deny against ↵Brice Figureau2009-07-071-7/+3
| | | | | | | | | | | | | | | opaque strings This patch removes the limitation of allow/deny which were only matching ip addresses or hostname (or pattern of). It makes sure any kind of string can be matched (by strict equality) while still keeping the old behaviour. Opaque strings can only contains: alphanumeric characters, - _ and @. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Removed extra whitespace from end of linesIan Taylor2009-06-063-17/+17
|
* Changed tabs to spaces without interfering with indentation or alignmentIan Taylor2009-06-069-29/+29
|
* Fix #2308 - Mongrel should use X-Forwarded-ForBrice Figureau2009-06-051-1/+15
| | | | | | | | | | | | Mongrel puppet code uses REMOTE_ADDR to set the ip address which will be use to authenticate the client access. Since mongrel is always used in a proxy mode with Puppet, REMOTE_ADDR is always the address of the proxy (usually 127.0.0.1), which defeats the purpose. With this changeset, the mongrel code now uses the X-Forwarded-For HTTP header value if it is passed over the REMOTE_ADDR. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add dynamic authorization to authstoreBrice Figureau2009-04-231-1/+48
| | | | | | | | | | | | | | | | | | | | | | The idea is to have allow/deny authorization directives that are dynamic: their evaluation is deferred until we perform the authorization checking in allowed?. This is done to allow replacing backreferences in allow/deny directives by parameters of the match that selected this right. For instance, it is possible to: allow $1.$2 And using Right::interpolate() with the result of a regex match using 2 captures, will evaluate $1.$2 to those captures. For instance, if we captured [host, reductivelabs.com], then the allow directive is replaced by: allow host.reductivelabs.com It is then safe to call allowed?, after which we can reset the interpolation. This interpolation is thread-safe. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com> authconfig regex support
* Fixing all tests that were apparently broken in the 0.24.x merge.Luke Kanies2009-04-021-4/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing tests broken in previous commitsLuke Kanies2009-03-111-12/+3
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #1849 - Ruby 1.9 portability: `when' doesn't like colons, replace with ↵James Turnbull2009-02-261-2/+2
| | | | semicolons
* Removing or fixing old testsLuke Kanies2009-02-191-28/+6
| | | | | | | | Most of these were just obsolete tests that have been sitting around and broke with recent internal changes. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing tests broken during the #1405 fix.Luke Kanies2009-02-062-159/+1
| | | | | | Most of these were small changes, like moved methods. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding an Agent::Runner class.Luke Kanies2009-02-061-57/+7
| | | | | | | This will eventually be used by puppetrun, but for now is just called by the old-school Runner handler. Signed-off-by: Luke Kanies <luke@madstop.com>
* Creating and using a new Puppet::Daemon classLuke Kanies2009-02-061-70/+0
| | | | | | | | | | | | This replaces the short-lived EventManager class, all of the service- and timer-related code in puppet.rb, and moves code from agent.rb, server.rb, and other places into one class responsible for starting, stopping, pids, and more. The Daemon module is no longer in existence, so it's been removed from the classes that were using it. Signed-off-by: Luke Kanies <luke@madstop.com>
* Renmaing Puppet::Network::Client::Master to Puppet::AgentLuke Kanies2009-02-061-472/+0
| | | | | | | | | Made minor changes, including removing the parent class. The functionality hasn't changed yet -- that comes in later patches -- but all but a couple of the older tests pass. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing all of the test/ tests I broke in previous dev.Luke Kanies2008-12-181-1/+1
| | | | | | | | | Most of these are straightforward changes to the tests, but a couple required small refactorings (e.g., References can now be created with Puppet::Type instances, and they know how to extract the type/title from them). Signed-off-by: Luke Kanies <luke@madstop.com>
* Deprecating the Puppet::Type.create.Luke Kanies2008-12-181-1/+1
| | | | | | | This method is no longer necessary; you can use the normal 'new' class method. Signed-off-by: Luke Kanies <luke@madstop.com>
* Renaming the "Catalog#to_type" method to "Catalog#to_ral"Luke Kanies2008-12-182-5/+5
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Renaming Puppet::Node::Catalog to Puppet::Resource::CatalogLuke Kanies2008-12-181-3/+3
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing all broken tests. Most of them were broken by fileserving changes.Luke Kanies2008-12-021-1/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Merge branch '0.24.x'Luke Kanies2008-12-021-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fixed #1711 - fileserver test fails due to incorrect mockingJames Turnbull2008-11-191-0/+5
| |
* | Changing the Cacher.invalidate method to Cacher.expire.Luke Kanies2008-11-111-1/+1
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing tests broken by fileserving and other refactoring.Luke Kanies2008-11-081-16/+17
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x' Removed the 'after' blocks that call Type.clear,Luke Kanies2008-10-173-7/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 a test that was failing as a result of the fix to #1491Luke Kanies2008-10-081-4/+1
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing the broken tests resulting from the fix for #1551.Luke Kanies2008-10-081-1/+3
| | | | | | | | | | | | The test was expecting the current time, albeit as an integer. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixed additional environments testsJames Turnbull2008-10-051-2/+1
| |
| * Fixing #947 - pluginsync no longer fails poorly when no plugins existLuke Kanies2008-10-031-0/+8
| | | | | | | | | | | | Note that it still fails -- it's just a more reasonable failure. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x' into mergingLuke Kanies2008-07-291-0/+34
|\| | | | | | | | | | | Conflicts: test/ral/type/filesources.rb
| * You can now select the encoding format when transferring the catalog,Luke Kanies2008-07-181-0/+34
| | | | | | | | | | | | | | | | | | | | with 'yaml' still being the default but 'marshal' being an option. This is because testing has shown drastic performance differences between the two, with up to 70% of compile time being spent in YAML code. Use the 'catalog_format' setting to choose your format, and the setting must be set on the client. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x'Luke Kanies2008-07-021-6/+10
|\| | | | | | | | | | | | | | | | | | | | | 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 #1114 - Facts in plugin directories should now be autoloaded,Luke Kanies2008-07-011-6/+10
| | | | | | | | as long as you're using Facter 1.5.
* | Merge branch '0.24.x'Luke Kanies2008-06-143-63/+38
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also added the fixes to make the certhandler tests pass even when certs exist; I'll deal with the conflict later. Conflicts: CHANGELOG bin/puppetd lib/puppet/network/http/handler.rb lib/puppet/network/http/mongrel/rest.rb spec/integration/indirector/rest.rb spec/integration/network/server/mongrel.rb spec/integration/network/server/webrick.rb spec/unit/network/http/webrick.rb
| * Merge branch 'tickets/1265' of git://github.com/lak/puppet into 0.24.xJames Turnbull2008-05-271-0/+1
| |\
| | * Fixing #1265 -- the ca/client tests now all pass again.Luke Kanies2008-05-261-0/+1
| | |
| * | Always using the cert name to store yaml files, which fixes #1178.Luke Kanies2008-05-262-63/+37
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Master handler previously provided the support for the :node_name setting, and that functionality has now been moved into the Node class. At the same time, the names to search through have been changed somewhat: Previously, the certificate name and the hostname were both used for searching, but now, the cert name is always searched first (unless node_name == facter), but only the Facter hostname, domain, and fqdn are used otherwise. We no longer split the cert name, only the hostname/domain/fqdn. In the general case, this provides no behaviour change, because people's hostname is the same as their certname. This only results in a change in behaviour if you specify a certificate name that is a normal node name, and you want to look that node up by something other than the full name in the certificate. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing #1247 -- no more clear_cache failures.Luke Kanies2008-05-251-1/+1
| | | | | | | | I had clearly only run spec/ since this work.
* | Fixing some broken tests.Luke Kanies2008-05-072-1/+2
| | | | | | | | | | | | | | The HttpPool module now removes its cached ssl_host instance when clearing its cache. This is really only useful for testing, but it correctly causes the pool to use new certificates when they're available.
* | Merge branch '0.24.x'Luke Kanies2008-04-113-314/+9
|\|
| * Modified the 'master' handler to use the Catalog class toLuke Kanies2008-04-112-204/+9
| | | | | | | | | | | | | | | | | | | | compile node configurations, rather than using the Configuration handler, which was never used directly. I removed the Configuration handler as a result. Modified the 'master' handler (responsible for sending configurations to clients) to always return Time.now as its compile date, so configurations will always get recompiled.
| * Removed the code from the client that tries to avoid recompilingLuke Kanies2008-04-101-110/+0
| | | | | | | | | | | | the catalog. The client will now always recompile, assuming it can reach the server. It will still use the cached config if there's a failure.
* | Fixing the tests in test/ that were broken asLuke Kanies2008-04-011-59/+26
| | | | | | | | a result of the move to no global resources.
* | Merge branch 'master' into master_no_global_resourcesLuke Kanies2008-03-315-81/+106
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fixing a couple of tests.Luke Kanies2008-03-242-29/+29
| |
| * tweak the (already applied) patch in ↵Sam Quigley2008-03-201-0/+4
| | | | | | | | 388cf7c3df7ce26e953949ed6fe63d76cbbb3691 to resolve #1137; also, add tests which detect the problem.
| * fixing another failing testLuke Kanies2008-03-191-0/+2
| |
| * Regression in :node_name functionalityJohn Ferlito2008-03-141-2/+9
| | | | | | | | When :node_name="cert" is specified the 'hostname' fact should be set to the SSL certificate common name instead of the results from facter. I've extended this to also set 'domain' and 'fqdn' since that makes a lot of sense to me. This fixes a regression introduced in SVN#1673
| * Fixing a test that changed the environment for all later tests,Luke Kanies2008-02-291-9/+1
| | | | | | | | thus breaking some of them.