Граф коммитов

1584 Коммитов

Автор SHA1 Сообщение Дата
James Turnbull c96d250f71 Fixed #1711 - fileserver test fails due to incorrect mocking 2008-11-19 18:55:57 +11:00
Brice Figureau 2c05a0abcb Move function existance test to parser evaluation
The aim is to let --parseonly succeeds even if the function
is not (yet) present. This is usefull in commit-hooks and
for the inline documentation generation system.

Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
2008-11-17 21:05:50 +11:00
Luke Kanies cc1297031d Completely refactoring the tidy type.
This was necessary because of how I changed file recursion.

The type works much more intelligently now -- files to
be removed have a file resource generated for them, and that
resource handles deletion.

Also fixes #1717; neither age nor size is required now.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-11-15 02:25:48 -06:00
Luke Kanies 053d7bfa67 These changes are all about making sure file data is expired when appropriate.
All file tests now pass.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-11-15 02:25:47 -06:00
Luke Kanies 14af971bc6 Changing the Cacher.invalidate method to Cacher.expire.
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-11-11 12:53:37 -08:00
Brice Figureau e032034fc4 Fix #1737 - ssh_authorized_keys should be able to parse options containing commas
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
2008-11-11 10:15:38 +11:00
Luke Kanies fe0b818c41 Fixing tests broken by fileserving and other refactoring.
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-11-08 12:52:52 -06:00
Luke Kanies 0149e2e125 Converting the file 'source' property to a parameter.
This makes a lot of sense because source was always
more of a metaparameter than a property -- it affected
the 'should' values of other properties, but it shouldn't
have done any other work.

It will hopefully make everything else much cleaner.

This is such a large commit mostly because of the need
to fix a lot of tests.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-11-05 23:04:33 -06:00
Luke Kanies aa8d09149c Switched all value management in props/params to internal classes.
This is a significant refactor of some very murky code, and it's
all much cleaner and more readable now.  All of the 'newvalue' methods
and any value-related code is in a ValueCollection class.

This puts us in a good position to refactor the Property and Parameter
classes more completely.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-11-04 16:20:46 -06:00
Luke Kanies 05e1325891 Moving a file purging test to rspec
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-11-04 16:20:45 -06:00
Luke Kanies a4d4444ba2 Removing obsolete methods and tests:
Removing obsolete handleignore method
    Removing obsolete FileSource class
    Removing a now-obsolete test/unit test
    Removing a now-obsolete recursive filebucket test

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-11-04 16:20:45 -06:00
Luke Kanies b4f4866b45 Making it so (once again) files with sources set can still be deleted
(which I think is kinda stupid, but apparently people want it).

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-11-04 16:20:45 -06:00
Luke Kanies caf15c27b8 Fixing and migrating more file tests.
This is an unfortunately messy commit; I should have tried harder
to separate the different tasks into different commits, but it's
not worth going back and doing now.

This is the first commit in the long road of fixing the existing file
tests, and in the process refactoring and better testing the code.

The refactoring in this commit is mostly around the 'stat' instance
variable that tests whether the file exists (and provides its metadata
if it does) and the 'insync?' method in the source property.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-11-04 16:20:45 -06:00
Luke Kanies 781a685248 Fixing a test I broke when fixing a reporting bug
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-11-01 10:42:17 +11:00
Luke Kanies e70c1a067a Fixing forward-compatibility issues resulting from no global resources
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-31 16:10:45 -05:00
Luke Kanies 4596d2d80e Fixing a test I broke when fixing a reporting bug
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-31 16:05:18 -05:00
Luke Kanies e76cac7df1 Merge branch '0.24.x'
Conflicts:

	CHANGELOG
2008-10-31 16:01:28 -05:00
Brice Figureau 2d37f09aa0 Fix #1402 - Allow multiline comments
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
2008-10-29 10:30:38 +01:00
Brice Figureau 9f30306d2c Fix #857 - Multiple class of the same name don't append code
The following manifest wasn't working:
class one {
notice('class one')
}

class one {
notice('second class one')
}

include one

It all boiled down to class code not being arrays.
Encapsulating code in ASTArray when needed is enough to append code,
because of the property of ASTArray to evaluate all their members in
turn.

Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
2008-10-29 10:28:32 +01:00
James Turnbull 56f3be66a4 Fixed #1710 - Spurious output in test run 2008-10-29 14:36:20 +11:00
Luke Kanies 801b8a643d Merge branch '0.24.x'
Conflicts:

	lib/puppet/type/user.rb
2008-10-22 18:30:57 -05:00
Brice Figureau 6d05cbc1e1 Fix #936 - Allow trailing comma in array definition
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
2008-10-21 21:15:53 +11:00
Brice Figureau e6f99f92ec Fix #636 - Allow extraneous comma in function argument list
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
2008-10-21 09:32:28 +11:00
Luke Kanies 8aee40de69 Merge branch '0.24.x' Removed the 'after' blocks that call Type.clear,
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
2008-10-17 09:01:04 -05:00
Luke Kanies 0fff7d76e8 Fixing some tests that were broken in 2fba85af
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-08 23:44:41 -05:00
Luke Kanies 2afbd0d877 Fixing a test that was failing as a result of the fix to #1491
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-08 22:33:05 -05:00
Luke Kanies aea55823db Removing a gid test for users, since it is a bad test and has mostly been replaced in rspec
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-08 22:32:56 -05:00
Luke Kanies 65d3040d5d Fixing a test that was broken in ee579641
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-08 22:32:56 -05:00
Luke Kanies b08002e45a Fixing some tests that were broken in the fix for #1633
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-08 22:32:56 -05:00
Luke Kanies 952ebb8bfa Fixing a test that was failing because of the change to retrieve() in ee579641
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-08 22:05:43 -05:00
Luke Kanies a5fe87fb3c Fixing a file source test that was failing because missing sources is now a failure
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-08 22:04:49 -05:00
Luke Kanies 53b7d42bb0 Fixing the broken tests resulting from the fix for #1551.
The test was expecting the current time, albeit as an integer.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-08 22:03:22 -05:00
Luke Kanies 5ec6b0734d Adding warnings when example groups are skipped.
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-08 21:27:21 -05:00
Luke Kanies 54abe7084d Moving some test/ package tests to rspec integration tests
and disabling a gem test that hangs forever for me.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-08 21:16:26 -05:00
Brice Figureau 0c297be5da Fix #1109 - allow empty if or else branches
This changesets allow empty if or else branches:

if true {
} else {
}

It works by emitting on the parser stack an AST node that doesn't
do anything (a no-op). This allows the less intrusive code
as no part of the if evaluation code has been touched.
2008-10-07 07:51:44 +11:00
Francois Deppierraz 990e8e3caa Fix #1530: Correctly parse ssh type 1 keys
This doesn't implies that puppet can managed SSH type 1 keys, it only
ignores them.
2008-10-07 00:24:02 +11:00
James Turnbull 06edac4a23 Fixed additional environments tests 2008-10-05 22:50:18 +11:00
Brice Figureau 79bb1f201c Rspec Tests for #381.
Moved part of the old resource reference tests to rspec.
2008-10-05 14:53:13 +11:00
James Turnbull 782181e0da Minor test fix for #1614 2008-10-04 13:21:51 +10:00
Luke Kanies db7f108f54 Adding rspec tests for the Puppet::Util::Log class.
Also using Puppet::Util::Tagging to handle the tagging,
rather than custom methods.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-04 08:48:16 +10:00
Luke Kanies 6bcfd9f021 Fixing #947 - pluginsync no longer fails poorly when no plugins exist
Note that it still fails -- it's just a more reasonable failure.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-03 13:11:44 -05:00
Luke Kanies d39bab9a02 Fixing package provider tests to use the new Transaction::Change interface
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-02 13:36:26 +10:00
Luke Kanies e32256af93 Migrating the apt and dpkg tests to rspec.
I left the aptitude and aptrpm tests as an exercise
for the reader.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-02 13:36:26 +10:00
Luke Kanies 8620775135 Fixed #791 - You should now be able to create and find a user/group in one transaction.
The real problem was that the 'gid' and 'uid' methods didn't handle
the case where 'get_posix_field' didn't return a value, and
the subsequent 'get_posix_field' calls couldn't handle that.

This commit moves the tests for Posix to spec, and fixes the
specific bug.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-10-02 07:32:03 +10:00
Brice Figureau 4cf9710bd2 Add parser for arbitrary expressions
The expressions can be used in if 'test' and in the
right side of assignements.

The expressions can contain any number of sub-expressions
combined by either arithmetic operators, comparison operators,
or boolean operators.

Random Usage Examples:
$result = ((( $two + 2) / $one) + 4 * 5.45) - (6 << 7) + (0x800 + -9)
or
if ($a < 10) and ($a + 10 != 200) {
...
}
2008-10-01 01:35:03 +10:00
Luke Kanies 4aeabbbb21 Merge branch '0.24.x'
Conflicts:

	lib/puppet/metatype/container.rb
	lib/puppet/metatype/instances.rb
	lib/puppet/metatype/metaparams.rb
	lib/puppet/metatype/relationships.rb
	lib/puppet/metatype/schedules.rb
2008-09-23 22:31:55 -05:00
Brice Figureau 7a3a38f58c Add rspec unit test for the append operator
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
2008-09-21 02:32:51 +10:00
Luke Kanies 5b9dd01326 Merge commit 'turnbull/0.24.x' 2008-08-26 22:40:26 -07:00
James Turnbull 29ae879232 Fixes tests broken by 95aa085 2008-08-27 15:30:24 +10:00
Andrew Shafer 0d118a5f22 Fix leaking LoadedFile when adding templates to be watched 2008-08-23 22:03:10 +10:00
Luke Kanies e3971b9751 Merge branch '0.24.x'
Conflicts:

	CHANGELOG
	test/util/posixtest.rb
2008-08-18 11:47:40 -05:00
James Turnbull 18dda20b41 Fixed $1456 - add proxy configuration to yum repo 2008-08-13 10:34:19 +10:00
Daniel Pittman 404450a715 Add testing for the changes to resolve redmine #1427, where Kernel methods shadow
variables that the puppet template should otherwise see.  Specific changes:

* Added testing of the Scope#to_hash method, which returns a hash of name and
  value pairs in a scope or, optionally, in the scope and enclosing scopes.

* Use member variables rather than methods in the function tests.

* Fix up tests that fail once we move over to instance variables rather than
  methods: Puppet can no longer detect an undefined variable reference, so we
  end up failing any test that expected to get a parser error.

* Several tests have manual checks introduced to simulate an end user manually
  writing the checks that used to be automatic, and others drop the validation
  that parsing fails when a variable is not in scope.

* Added tests for legacy variable lookup and that the shadowing of local
  variables by Kernel methods is still in effect.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
(cherry picked from commit 5c5f315cceadc52203e53883b77bc01c1d7a2e7f)
2008-08-01 08:54:05 +10:00
Luke Kanies 40375a8fc3 Merge branch '0.24.x' into merging
Conflicts:

	test/ral/type/filesources.rb
2008-07-29 00:46:11 -05:00
James Turnbull 97987a705d Feature #1241 : Improve performance of group lookups 2008-07-29 08:08:36 +10:00
Luke Kanies d9aa5ab68f Fixing a cert test to pass on Darwin.
Darwin has a case-insensitive FS, so the test was failing
because it was specifically testing case sensitivity.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-07-21 13:16:08 -05:00
Andrew Shafer a47fed4156 'Fix' broken tests related to missing source raising
Issue 1437
In two cases, I removed the assertion that caused the failure.
In one case, I changed the assertion to expect an exception.
2008-07-20 14:23:11 +10:00
Luke Kanies d8937acb8c You can now select the encoding format when transferring the catalog,
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>
2008-07-18 16:41:54 +10:00
Luke Kanies 8f8ce60819 Fixed #1431 - Provider confines must now specify similar tests in one call.
I.e., you can't do confine :operatingsystem => %w{a b} and then
confine :operatingsystem => %w{b c}; you'd need to do them in one command.
This now-obsolete behaviour does not seem to be used anywhere.
The fix for #1431 is actually just removing the tests that exposed
this change; the change happened when I refactored how confines work.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-07-17 12:30:33 -05:00
Luke Kanies 7fa7251e30 The mongrel-related tests now run without mongrel.
Here were the main changes necessary:
* Fixed the class loader so it only loads mongrel if it's available.
* Fixed the test runner to skip example groups contained in non-runnable
  example groups.
* Fixed the Mongrel tests to use quoted class names instead of constants,
  since the constants themselves would be absent.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-07-17 13:08:33 +10:00
Luke Kanies b0febd263c Merge branch '0.24.x'
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
2008-07-04 22:14:37 -05:00
James Turnbull 81be1c5c3f Merge branch 'refactor/0.24.x/transaction_changes' of git://github.com/lak/puppet into 0.24.x 2008-07-05 10:21:36 +10:00
Luke Kanies 2863df2881 Refactoring the Transaction::Event class.
The class had a 'transaction' accessor that was assigned
but never used, and it is simple enough that it needed
direct arguments rather than named arguments.

The rest of the code is changing the other classes that use
Events.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-07-04 15:35:18 -05:00
Luke Kanies 31ffeabad9 Adding tests to the Transaction::Change class.
There's a small amount of refactoring here, mostly
removing code that appears to not be used at all.

Signed-off-by: Luke Kanies <luke@madstop.com>
2008-07-04 15:05:29 -05:00
Luke Kanies 73c06c05ae Renaming Puppet::Event to Puppet::Transaction::Event
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-07-03 18:50:56 -05:00
James Turnbull 84b566590f Updated test/ral/type/sshkey.rb test 2008-07-04 09:40:01 +10:00
Luke Kanies 6124c693c9 Renaming the Puppet::PropertyChange class to Puppet::Transaction::Change.
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-07-03 17:53:07 -05:00
Luke Kanies 3795654323 Merge branch '0.24.x' 2008-07-02 18:36:05 -05:00
Luke Kanies e03c1be35c Fixing #1382 - existing uppercase certs, keys, et al will be renamed.
This correctly renames the files and they still get read in.
2008-07-02 18:12:26 -05:00
Luke Kanies 8e4312ed24 Merge branch '0.24.x'
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
2008-07-02 00:32:52 -05:00
Luke Kanies ee9d0025ee Fixed #1114 - Facts in plugin directories should now be autoloaded,
as long as you're using Facter 1.5.
2008-07-01 12:57:56 -05:00
Luke Kanies 00182ff96f Fixed #707 - special '@reboot'-style cron jobs work again. 2008-06-17 19:40:39 +10:00
James Turnbull 955a8ff876 Removed test/util/loadedfile.rb tests which fixes #1370 2008-06-17 09:46:47 +10:00
Luke Kanies 6a61198f92 Merge branch '0.24.x'
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
2008-06-14 13:53:56 -05:00
James Turnbull ad3803ff6f Fixes for install.rb running of tests that fixes #1267 2008-05-27 14:10:40 +10:00
James Turnbull d2eb1948ee Merge branch 'tickets/1265' of git://github.com/lak/puppet into 0.24.x 2008-05-27 11:53:10 +10:00
Luke Kanies 8a22b59c7d Fixing #1265 -- the ca/client tests now all pass again. 2008-05-26 18:06:50 -05:00
Luke Kanies 02411f5d74 Always using the cert name to store yaml files, which fixes #1178.
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>
2008-05-26 17:41:38 -05:00
Luke Kanies 6f533d1127 Fixing #1247 -- no more clear_cache failures.
I had clearly only run spec/ since this work.
2008-05-25 16:01:26 -05:00
Luke Kanies 29f5f1b862 Merge branch '0.24.x'
Conflicts:

	CHANGELOG
	lib/puppet/transaction.rb
2008-05-25 16:00:48 -05:00
Luke Kanies bd51a53b08 Fixing transaction support for prefetching generated resources.
Previously, we prefetched then generated, which caused generated
resources that needed prefetching not to work.  This just reorders
the calls, so generated resources now get prefetched.
2008-05-21 00:46:25 -05:00
Luke Kanies fe157f239a Merge branch '0.24.x'
Conflicts:

	CHANGELOG
	spec/integration/defaults.rb
	spec/integration/node/catalog.rb
	spec/unit/rails.rb
	spec/unit/type/mount.rb
2008-05-20 10:19:10 -05:00
James Turnbull 38545d9a81 Crontab provider: fix a parse error when a line begins with a space character
Tests for Bug #1216

Updated CHANGELOG
2008-05-16 16:50:29 +10:00
Luke Kanies a1409d73b4 Moving all confine code out of the Provider class, and fixing #1197.
I created a Confiner module for the Provider class methods,
and then I enhanced the interface between it and the Confine
class to make sure binary paths are searched for fresh each time.

This fixes #1197, which was a result of binary paths being
searched for at startup, rather than at execution.
2008-05-15 23:09:58 -05:00
Luke Kanies 995991d874 Switching the Provider class to use the new Confiner class. 2008-05-15 22:21:50 -05:00
Luke Kanies ac79a79c8d Duh, fixing all of the paths being loaded for spec in the moved tests. 2008-05-15 19:34:21 -05:00
Francois Deppierraz db8a46c605 New native ssh_authorized_key type 2008-05-07 22:04:07 +02:00
Luke Kanies e936ef2426 Fixing some broken tests.
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.
2008-05-07 14:45:13 -05:00
Luke Kanies 0365184aae Removing obsolete tests 2008-05-07 13:28:51 -05:00
Luke Kanies 3303590156 The master and client now successfully speak xmlrpc using the new system.
The server is actually serving REST, but the client can't use
it until we resolve the format and security issues that REST
hasn't yet tackled.
2008-05-07 12:29:58 -05:00
Luke Kanies ebdbe4880d Added an Interface class to the CA to model puppetca's usage.
This class provides all of the semantics from puppetca,
and appears to entirely duplicate the behaviour of the existing
executable, with basically all of the code in a library
file, instead of the executable.

As such, I've deleted the test for the executable.  We should have
one, but it's not nearly as important.
2008-04-19 19:08:36 -05:00
Luke Kanies bb87464f75 Fixing a couple of broken tests. 2008-04-15 21:34:03 -05:00
Luke Kanies fb05ef3c96 Merge branch '0.24.x' 2008-04-11 13:01:42 -05:00
Luke Kanies b49fd49562 Resources now return the 'should' value for properties from
the [] accessor method (they previously threw an exception when
this method was used with properties).  This shouldn't have any
affect functionally; it just makes the method equivalent to 'should'
for properties, but it works for all attribute types now.
2008-04-11 13:01:17 -05:00
Luke Kanies 4aaad26509 Modified the 'master' handler to use the Catalog class to
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.
2008-04-11 11:34:51 -05:00
Luke Kanies 2925ad1cb9 Fixed #1184 -- definitions now autoload correctly all of the time. 2008-04-10 23:18:20 -05:00
Luke Kanies 376628d117 Removed the code from the client that tries to avoid recompiling
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.
2008-04-10 23:17:36 -05:00
Luke Kanies 80f8b80eac Adding validation to the user type to confirm that the
group list does not contain any commas. This seems to be
a common problem.
2008-04-08 11:19:15 -05:00
Luke Kanies b49fb68f76 Fixing the tests in test/ that were broken as
a result of the move to no global resources.
2008-04-01 00:45:45 -05:00
Luke Kanies 88dc49cb7b Merge branch 'master' into master_no_global_resources
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
2008-03-31 23:56:09 -05:00
Paul Lathrop 9d30b26033 Fixes #1148 - replaces #!/usr/bin/ruby with #!/usr/bin/env ruby. 2008-03-28 17:43:16 -05:00
Luke Kanies a8592f1009 Merge branch '0.24.x'
Conflicts:

	install.rb
	lib/puppet/defaults.rb
	man/man8/puppet.8
2008-03-25 18:18:34 -05:00
Luke Kanies 6a535195a9 Fixing #571 -- provider suitability is now checked at resource
evaluation time, rather than resource instantiation time.  This
means that you don't catch your "errors" as early, but it also
means you should be able to realistically configure a whole host
in one run.
2008-03-24 17:10:00 -05:00
Luke Kanies 528bbf1cae Fixing a couple of tests. 2008-03-24 16:37:56 -05:00
Luke Kanies 18320b8e32 Found all instances of methods where split() is used without
any local variables and added a local variable -- see
http://snurl.com/21zf8.  My own testing showed that this
caused memory growth to level off at a reasonable level.
Note that the link above says the problem is only with class
methods, but my own testing showed that it's any method that
meets these criteria.  This is not a functional change, but
should hopefully be the last nail in the coffin of #1131.
2008-03-21 00:39:26 -05:00
Luke Kanies f6325dceb3 Found an array that leaked pretty quickly between reparsing
files, thanks to work by Adam Jacob and Arjuna Christenson
(the finding, not the leak).  I'm going to act like this
fixes #1131, at least for now, but I doubt it does,
since that shows general memory growth over time, whereas
the leak here should go away as soon as files are reparsed
(because the parser is holding the reference to the leaking
array).
2008-03-21 00:26:08 -05:00
Sam Quigley 54bedb2bba tweak the (already applied) patch in 388cf7c3df to resolve #1137; also, add tests which detect the problem. 2008-03-20 23:22:14 -05:00
Luke Kanies e190779842 Merge branch '0.24.x' 2008-03-20 11:55:42 -05:00
Luke Kanies 2795ba47cc fixing another failing test 2008-03-19 10:56:22 -05:00
Luke Kanies a40e9b7dc5 Fixing some tests that only failed under certain
circumstances (mostly, when loaded with other files, or
when loaded from rake or autotest rather than separately).
2008-03-18 18:16:03 -05:00
John Ferlito 388cf7c3df Regression in :node_name functionality
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
2008-03-14 13:58:24 +11:00
Luke Kanies 495632345d Fixing #1132 -- host names can now have dashes anywhere.
(Patch by freiheit.)
2008-03-13 13:55:08 -05:00
Luke Kanies ecb873d3a6 Fixing #1118 -- downloading plugins and facts now ignores noop.
Note that this changes the behaviour a bit -- the resource's
noop setting always beats the global setting (previously,
whichever was true would win).
2008-03-13 12:36:21 -05:00
Luke Kanies 9f8bb7e42a Merge branch '0.24.x' 2008-03-07 12:28:58 -06:00
Luke Kanies 647f5b458e Always duplicating resource defaults in the parser, so that
stacked metaparameter values do not result in all resources
that receive a given default also getting those stacked
values.
2008-03-06 13:07:11 -06:00
Luke Kanies c2b33acd5c Merge branch '0.24.x' 2008-03-05 12:30:45 -06:00
Luke Kanies a7339ec5f6 Fixing a few tests 2008-02-29 13:22:55 -06:00
Luke Kanies 857814ac80 Fixing tests that did not work with Rails 2. 2008-02-29 11:51:15 -06:00
Luke Kanies 7ca0ad64f4 Fixing a test that changed the environment for all later tests,
thus breaking some of them.
2008-02-29 11:50:17 -06:00
Luke Kanies 43aea83eb1 renaming ral/types to ral/type in the tests 2008-02-28 17:53:46 -06:00
Luke Kanies bb8051bc40 Removed the loglevels from the valid values for 'logoutput'
in the Exec resource type -- the log levels are specified
using the 'loglevel' parameter, not 'logoutput'.  This never
worked, or at least hasn't for ages, and now the docs are
just correct.
2008-02-27 15:43:09 -05:00
Luke Kanies 9d2f45df3d Merge branch '0.24.x' 2008-02-25 18:28:26 -05:00
Luke Kanies 0323986acd Merge commit 'turnbull/0.24.x' into 0.24.x 2008-02-23 19:09:29 -05:00
Luke Kanies ff97059145 Somewhat refactored fileserving so that it no longer caches
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.
2008-02-23 19:06:29 -05:00
James Turnbull 5d35bc5904 Fixes #1078 and includes new test 2008-02-23 08:41:24 +11:00
Luke Kanies b06767ee2d Quashed commit of my fixes for #1010. 2008-02-21 23:18:40 -05:00
Luke Kanies a53106cf08 Merge branch '0.24.x'
Conflicts:

	CHANGELOG
	man/man8/puppet.8
2008-02-18 09:38:32 -06:00
Luke Kanies c4f7c51800 Fixing comment -- ticket #1027 instead of #1064 2008-02-13 17:30:18 -06:00
Luke Kanies 892055709a Fixing #1064 -- providers et al are now autoloaded
from modules even when Autoload#loadall is used.
2008-02-13 17:29:23 -06:00
Luke Kanies f8afe13169 Fixed #1043 -- autoloading now searches the plugins directory
in each module, in addition to the lib directory.  The 'lib'
directory is also deprecated, but supported for now to give
people a chance to convert.
2008-02-13 16:52:26 -06:00
Luke Kanies 0cfa1d2b7a Fixed #968 again, this time with tests -- parseonly works,
including not compiling the configurations, and also storeconfigs
is no longer required during parse-testing.
2008-02-13 16:27:35 -06:00
Luke Kanies 8367fdfab2 Renaming the 'pfile' and 'pfilebucket' files to plain
'file' and 'filebucket'.  This should have been done
years ago.
2008-02-13 15:49:51 -06:00
Luke Kanies be58bb5c4b Merge branch '0.24.x' 2008-02-12 23:00:52 -06:00
Luke Kanies 98dbfa2865 Loading the mocha gem from the puppettest.rb file. 2008-02-12 23:00:40 -06:00
Luke Kanies 1b90f7f8b5 Trying to upgrade rspec, but not having much luck. 2008-02-12 22:11:30 -06:00
Luke Kanies da78d96cb1 Merge branch '0.24.x'
Conflicts:

	CHANGELOG
2008-02-12 17:37:51 -06:00
Luke Kanies 7e45553448 Fixed #997 -- virtual defined types are no longer evaluated.
NOTE: This introduces a behaviour change, in that you previously
could realize a resource within a virtual defined resource, and now
you must realize the entire defined resource, rather than just
the contained resource.
2008-02-12 14:57:24 -06:00
Luke Kanies c8da318a2a Moving the ast node tests to rspec (which I could have
*sworn* I did this weekend).  In the process, I fixed
a couple of bugs related to differentiating between
nodes and classes, and then cleaned up quite a few
error messages.
2008-02-12 14:19:19 -06:00
Luke Kanies 8b2fae019b Removing the last remaining vestiges of GRATR --
removing the bangs from 'add_vertex!' and 'add_edge!'.
2008-02-11 18:27:49 -06:00
Luke Kanies fd0c5cbdde Changing the name of the Compile class to Compiler,
since it's stupid to have a class named after
a verb.
2008-02-11 17:59:34 -06:00
Luke Kanies e247b56d99 Changing some methods in the Compile class to
be more internally consistent (switched store_resource
to add_resource, and store_override to add_override).
2008-02-11 17:33:12 -06:00
Luke Kanies 6a4cf6c978 Fixed #1030 - class and definition evaluation has been significantly
refactored, fixing this problem and making the whole interplay
between the classes, definitions, and nodes, and the Compile class much
cleaner.
2008-02-11 17:24:02 -06:00
Luke Kanies 3b740ff7a6 Converting the Compile class to use a Node::Catalog instance
as its resource container, instead of having its own behaviour
around resource uniqueness.
2008-02-11 13:59:25 -08:00
Luke Kanies 194e7309c9 Moving all of the tests for Puppet::Parser::Compile to
rspec, so I can refactor the class to more heavily rely
on a Node::Catalog instead of doing its own resource
container management.
2008-02-11 12:37:00 -08:00
Luke Kanies fb4bdc0b02 More AST refactoring -- each of the code wrapping classes
just returns a resource from its evaluate() method, and
all of the work is done in the evaluate_code method.  This
makes the code cleaner, because it means 1) evaluate() has
the same prototype as all of the other AST classes,
2) evaluate() is no longer called indirectly through
the Parser Resource class, and 3) the classes themselves
are responsible for creating the resources, rather than
it being done in the Compile class.
2008-02-08 13:54:53 -08:00
Luke Kanies 5a0e34b4f8 Refactoring the AST classes just a bit. I realized that
all of the evaluate() methods only ever accepted a scope,
and sometimes one other option, so I switched them all to
use named arguments instead of a hash.
2008-02-08 14:25:52 -06:00
Luke Kanies 7c500dac31 Stubbing Facter during the snippet tests, so they are faster and work with no network 2008-02-08 11:41:22 -06:00
Paul Lathrop 8f0d87d498 Added :env parameter for backwards-compatibility, with warning about deprecation. :env parameter sets new :environment parameter. Changed instances of :env to :environment for consistency with other types. Added tests for new parameters. This cimmit fixes ticket 1007. 2008-02-05 14:05:14 -08:00
Luke Kanies 1b1164d5d6 Merge branch '0.24.x' of git://wormwood.lovedthanlost.net/puppet into 0.24.x 2008-02-05 09:00:03 -06:00
James Turnbull 28a8577f82 Added hostname test for hosts type 2008-02-06 00:55:36 +11:00
Luke Kanies e96c5f8423 Merge commit 'turnbull/0.24.x' into 0.24.x 2008-02-04 23:56:35 -06:00
James Turnbull 16df87c419 Updated fix for ticket #151 and added a test 2008-02-05 13:52:12 +11:00
Luke Kanies ed0c745c0f Fixing #1017 -- environment-specific modulepath is no
longer ignored.  (Cherry-picked from master.)
2008-02-04 19:32:36 -06:00
Luke Kanies 6ff9423c7e Significantly refactoring the lexer, including adding Token and TokenList
classes for managing how the tokens work.

I also moved they tests to RSpec, but I didn't rewrite all of them.
2008-01-30 23:28:07 +11:00
Luke Kanies 7a4935f7b3 Fixing a couple of tests, one related to recent tagging changes
and one that somehow slipped through when I removed the GRATR
code.
2008-01-28 15:07:02 +11:00
Luke Kanies b225e86b12 Fixing #1017 -- environment-specific modulepath is no
longer ignored.
2008-01-20 22:00:05 -08:00
Luke Kanies 0a7b028a9a Merge branch '0.24.x' 2008-01-19 11:30:04 -08:00
James Turnbull c751058722 Removed remaining elements of old_parse - closing Ticket #990 2008-01-19 04:17:33 +11:00
Luke Kanies 4165edaeb7 More fixes to the testing. 2008-01-15 19:41:38 -08:00
Luke Kanies cfda651f88 Another round of test-fixes toward eliminating global resource
references.  This should have gotten rid of all of them,
and now it's just a question of fixing a few hopefully unrelated
failing tests.
2008-01-14 13:34:06 -08:00
Luke Kanies 488c43771a Fixing automatic relationships. I was previously looking them
up in the relationship graph, which only stores the vertices, not
the resource table.
2008-01-14 09:30:30 -08:00
Luke Kanies 5bef4a55b3 Another round of fixes toward making global resources work.
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.
2008-01-09 13:03:15 -08:00
Luke Kanies 3cc3e0f5b2 Lots o' bug-fixes toward getting rid of global resources.
We still have about 60 failing tests, but some of them are
the failing directory service tests (probably 20 or so),
and most are simple fixes to the tests themselves.
2008-01-08 09:23:34 -06:00
Luke Kanies 40addcd192 Fixing #982 -- I have completely removed the GRATR graph library
from the system, and implemented my own topsort method.
2008-01-07 19:24:10 -06:00
Luke Kanies 4e8bc40ad7 Fixing the inability to manage '/' directly. It was a result
of stripping extra and trailing slashes.
2007-12-27 21:35:42 -06:00
Luke Kanies c59ff622a3 Further fixes toward #965. Turned out that the previous fix
caused other problems.

This whole thing will hopefully get *drastically* easier once we
get rid of global resources.
2007-12-21 17:52:06 -06:00
Luke Kanies 927cb24c0a Fixing #967 -- default resources no longer conflict with
managed resources.
2007-12-19 13:43:22 -06:00
Luke Kanies 553b2ad8ad Entirely refactoring http keep-alive. There's now
a central module responsible for managing the http pool
(Puppet::Network::HttpPool), and it also handles
setting certificate information.  This gets rid of
what were otherwise long chains of method calls,
and it makes the code paths much clearer.
2007-12-19 11:42:22 -06:00
Luke Kanies 92b0ebc7b7 Fixing #967 -- relationships now work when running 0.23.x clients
against 0.24.0 servers.
2007-12-18 16:47:36 -06:00
Luke Kanies 1ada24d4d4 Fixing some tests that were failing with the recent ruby that has
ssl issues.
2007-12-18 16:44:55 -06:00
Luke Kanies e0f5444021 Fixing the webrick test to provide a correct host
name so the stupid ssl checks pass during the test.
2007-12-12 16:58:08 -06:00
Luke Kanies cb0c4eebb0 Renaming 'configuration' to 'catalog', fixing #954. 2007-12-11 15:35:36 -06:00
Luke Kanies 02b64ab3bc Applying patch by josb in #884 to provide pattern
matching in the tidy type.
2007-12-11 00:36:44 -06:00
Luke Kanies f127d04934 Fixing #951 -- external nodes work again, but you have to
set the 'node_terminus' setting to 'exec'.
2007-12-10 21:13:48 -06:00
Luke Kanies ae33e57d1b Fixing #923 (again). The host storage method was not
correctly searching for the host, so it was creating
a new host on each run, which is what was causing the
conflict.
2007-12-10 12:16:08 -06:00
Jeffrey J McCune a012849e9c Updated tests for http_enable_post_connection_check configuration setting. 2007-11-29 17:15:15 -05:00
Jeffrey J McCune 4d4abd36b8 Better test to match the behavior of the code. 2007-11-29 09:48:17 -05:00
Jeffrey J McCune 24cacdbde3 Fixed test case for http_enable_post_connection_check 2007-11-29 09:43:32 -05:00
Luke Kanies 8eecbe54c9 Fixing another failing test I somehow missed in my last big commit 2007-11-28 19:03:32 -06:00
Luke Kanies dedc56a6ae Fixing #527 (rewrote service tests), #766 (services only restart when they
are running), and #918 (service tests fail when hddtemp is not installed).

Mostly, I just rewrote the service tests, but I cleaned up the cruft from the
Service class, too.
2007-11-28 18:38:48 -06:00
Luke Kanies 11ae473e38 Theoretically, this patch is to fix #917 (which it does), but
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.
2007-11-28 15:20:52 -06:00
Luke Kanies c6d1746199 Fixing the first half of #917 -- the ResourcReference
AST code now correctly finds the resource.  It's getting
lost in the configuration translation, though, so I
need to fix that, too.
2007-11-28 11:47:34 -06:00
Luke Kanies 6c1d8d3bc4 Applying fix to xmlrpc client tests by Matt Palmer 2007-11-27 21:37:59 -06:00
Luke Kanies 4e52ffc680 Fixing #796 -- the fileserver can now start with no
configuration file (it creates both default mount points
if it does) and puppetmasterd no longer requires the
configuration file to exist.
2007-11-27 18:37:46 -06:00
Luke Kanies 168fa5f912 Fixing the asuser method in Puppet::Util::SUIDManager
so that it correctly just yields if you're not root.  It
also no longer tries to set :uid or :gid; just :euid and :egid,
and it once again sets :egid before it sets :euid, which is
important because you usually can't change your group after
you've changed your user id.
2007-11-27 18:35:25 -06:00
Luke Kanies 0ef6b9579d Fixing #931 by keeping track in configurations of
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.
2007-11-27 17:24:13 -06:00
Luke Kanies a38b415124 Fixing #927 -- rewriting the test to actually test what it's
supposed to be doing and to skip the whole network connect thing.

FTR, the reason this is happening is because the keepalive patch
causes http instances to start immediately, which wasn't previously
the case. I have been noticing that not all failures that should
result from this happen consistently.
2007-11-27 13:57:05 -06:00
Luke Kanies 7ff8ea5a1a Fixing the persistent and periodic schedule test failures
by rewriting the schedule tests entirely.
2007-11-27 13:49:05 -06:00
Luke Kanies 2cb1199478 Fixing the breakage that I caused when I added the 'declared_feature?'
method to provider features.
2007-11-26 22:57:33 -06:00
Luke Kanies 2d19ee2a04 Fixing #920 -- I have replaced the existing mount test with an
rspec version.  It's not perfect, in that it only tests
the :ensure state, but that's where 90% of the behaviour is.
2007-11-26 22:48:44 -06:00
Luke Kanies c3dde68315 Fixing #919 -- installed packages used for testing are just ignored,
rather than throwing a failure.
2007-11-26 19:51:15 -06:00
Luke Kanies 12ebbe2442 Rewriting the tests for the package resource type, fixing #930. 2007-11-26 19:27:30 -06:00
Luke Kanies fc7f1b4f70 Fixing #921, mostly by just deleting the existing test. I had
already migrated all of the tests into rspec but forgot about these
tests -- they were only in the rails/ subdir because people kept
not running the parser/ tests after modifying the Rails code.
2007-11-26 15:26:05 -06:00
Luke Kanies 4e9c39e6a7 Merge branch 'plugins_mount', fixing #891.
Conflicts:

	CHANGELOG
2007-11-24 23:17:57 -06:00
Luke Kanies b575d15853 Integrating Matt Palmer's patch to provide a 'plugins'
mount, fixing #891.  The patch was ported to the current
code by David Schmitt, I applied the rest of Matt's
patches, and I then fixed all of the code so that the
tests passed.

The primary change I had to make to the patch was reenabling
host expansion in paths -- his patch had disabled it.
2007-11-24 23:16:47 -06:00
Luke Kanies 676efa77b2 Incorporating patch 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.
2007-11-24 18:03:55 -06:00
Luke Kanies 8de1412d97 Integrating most of Matt Palmer's from
http://theshed.hezmatt.org/mattshacks/puppet/_patches/puppet-0.23.2/.

There are still a few that haven't made it in, notably those related
to the plugins module, which I'm planning on integrating separately.
2007-11-24 14:54:38 -06:00
Luke Kanies a525ab5f1d Fixing a couple of tests that were failing because of the environment changes. 2007-11-23 16:45:28 -06:00
Luke Kanies 3d2e1a535b Adding some unit tests for the interface type before i go messing around with it 2007-11-23 12:27:24 -06:00
Luke Kanies cc88441a61 Removing the manual ssldir setting by David in 59626cb390 2007-11-19 16:34:09 -06:00
Luke Kanies 7e0e6c0dff Merge commit 'davids-bugfixes/tests/fix-test-client-ca' 2007-11-19 16:33:03 -06:00
Luke Kanies 1bf3999ec0 Fixing a failing test from my fix for #446 -- I had changed
the behaviour of Resource#override_parameter unintentionally.
I've corrected the comments so it's clear why the original behaviour
was there.
2007-11-19 16:30:20 -06:00
Luke Kanies 3f0b250f66 Fixing a few test suites that passed when run as
part of the suite, but failed when run individually.  The
problem was that I changed lib/puppettest/support/utils to
have a separate module and I didn't test the individual files.
2007-11-19 16:20:03 -06:00
Luke Kanies 8f82fc4284 Merge commit 'davids-bugfixes/tests/fix-cron-tests' 2007-11-19 10:30:12 -06:00
Luke Kanies 2b14f627ac Reverting the changes I'd made toward removing the global
resources.  These are commits:

    c19835ce9f
    9290cc89a2
    ffb4c2dbc7
2007-11-19 01:36:48 -06:00
Luke Kanies 8838e9bb7c Merge commit 'davids-bugfixes/rest/fix-815-by-using-main-explicitly' 2007-11-18 23:25:04 -06:00
Luke Kanies c19835ce9f Fixed most failing tests, but there are still over thirty failing.
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.
2007-11-18 11:21:22 -06:00
Luke Kanies b65fb8316e Fixing a parser test -- really, just removing tests
that belong with the AST classes rather than in the parser.

Yeah, these tests need to be rewritten.

Committed on an airplane. :)
2007-11-13 10:34:50 -06:00
Luke Kanies 72510bfaa6 Fixing #800 by refactoring how configurations are retrieved
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.
2007-11-12 22:08:44 -06:00
Luke Kanies dd7caa76e1 Moving some compile tests to the spec/ directory, and
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.
2007-11-12 11:00:54 -06:00
Luke Kanies 47a26054fe Changing the 'main' class to no longer be lazy-evaluated.
It was getting evaluated after node classes, which caused
even stranger ordering issues.
2007-11-12 10:09:05 -06:00
David Schmitt 59626cb390 fix failing CA test, when testing with incomplete setup (no ssldir, no DNS)
3) Failure:
test_webxmlmix(TestBucket)
    [./network/handler/bucket.rb:222:in `test_webxmlmix'
     /home/david/Work/puppet/misspiggy/puppet-luke/test/lib/mocha/test_case_adapter.rb:19:in `__send__'
     /home/david/Work/puppet/misspiggy/puppet-luke/test/lib/mocha/test_case_adapter.rb:19:in `run']:
Exception raised:
Class: <OpenSSL::SSL::SSLError>
Message: <"hostname was not match with the server certificate">
---Backtrace---
/usr/lib/ruby/1.8/openssl/ssl.rb:91:in `post_connection_check'
/usr/lib/ruby/1.8/net/http.rb:588:in `connect'
/usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
/usr/lib/ruby/1.8/net/http.rb:548:in `start'
/home/david/Work/puppet/misspiggy/puppet-luke/lib/puppet/network/xmlrpc/client.rb:141:in `start'
/home/david/Work/puppet/misspiggy/puppet-luke/lib/puppet/network/client.rb:95:in `initialize'
/home/david/Work/puppet/misspiggy/puppet-luke/lib/puppet/network/client/dipper.rb:16:in `initialize'
./network/handler/bucket.rb:223:in `new'
./network/handler/bucket.rb:223:in `test_webxmlmix'
./network/handler/bucket.rb:222:in `test_webxmlmix'
/home/david/Work/puppet/misspiggy/puppet-luke/test/lib/mocha/test_case_adapter.rb:19:in `__send__'
/home/david/Work/puppet/misspiggy/puppet-luke/test/lib/mocha/test_case_adapter.rb:19:in `run'
---------------
2007-11-11 10:16:37 +01:00
David Schmitt d48ee3e0f6 fix crontests depending on ENV[USER] by using Etc.getpwuid(Process.uid) instead 2007-11-11 09:54:18 +01:00
David Schmitt 61ef2893c5 fix #815: add :main to all use() for :reporting and :metrics 2007-11-09 18:29:04 +01:00
Luke Kanies 964aebb964 Merge branch 'master' of ssh://reductivelabs.com/opt/rl/git/puppet 2007-11-08 16:31:03 -06:00
Luke Kanies 8f04446c94 Fixing the 'mount' tests so that they no longer
modify the local system and they run fine as
non-root users.
2007-11-08 16:30:51 -06:00
Luke Kanies ba19989c6e Switching the class resource evaluation to only happen
when using :include, not (for example) when evaluating
node classes.
2007-11-08 15:58:45 -06:00
Luke Kanies cf75168dc2 Classes once again get evaluated immediately when the
'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.
2007-11-08 15:54:14 -06:00
Luke Kanies dfe774f55e Switching the base class for the Relationship class.
It was previously using the GRATR::Edge class, which
had wonky overrides that dramatically slowed down
sorting (its hash mechanism hashed the source and
target so that edges with the same source/target got
the same hash, which we actually don't want any more).

This shouldn't change any functionality, just performance.

I didn't retain all functionality from the Edge class, but
a lot of that functionality was, um, horrible, like Edge[]
being equivalent to Edge.new.
2007-11-08 12:18:42 -06:00
Luke Kanies 1ffcce079f Splitting the puppetd tests into two tests. It is still not a very good test, but I do not know of a good way to test this, really. 2007-11-08 11:24:46 -06:00
Luke Kanies 065a1d0281 Switching the graph base class from GRATR::Digraph
to Puppet::SimpleGraph, which should dramatically enhance
performance.  It should be largely functionally equivalent,
with the only difference being that edges are no longer deduplicated.
2007-11-07 17:48:50 -06:00
Luke Kanies d03f68eaed Changing the test/ classes so that they work from the main
test/ dir or from their own working dir, like the specs do.
This was just a question of changing how their libraries
are loaded.
2007-10-26 11:26:57 -05:00
Luke Kanies 694f98b4d9 Fixing failing tests, including making the debian service
provider test work on non-Debian platforms.
2007-10-13 14:14:06 -05:00
Luke Kanies 29feac0cec Translating the report handler to an indirected model.
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.
2007-10-13 14:07:24 -05:00
Luke Kanies 9db7aae242 Merge branch 'master' of git://michaelobrien.info/puppet into michael 2007-10-09 12:02:37 -05:00
Luke Kanies 32753e11d9 Merge branch 'master' of git://michaelobrien.info/puppet into michael 2007-10-09 10:54:21 -05:00
Michael V. O'Brien d4871bf5fb Merge branch 'parser-absent' of http://marcin.owsiany.pl/tmp/puppet into porridge 2007-10-09 10:43:17 -05:00
Luke Kanies 01f132d8b8 Merge branch 'master' of git://michaelobrien.info/puppet 2007-10-09 10:04:01 -05:00
Luke Kanies d24c1ccc56 All tests should now pass again.
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.
2007-10-08 19:12:39 -05:00
Michael V. O'Brien 7ac7872c74 Fixed #822. Applied patch provided by DavidS. 2007-10-08 11:13:50 -05:00
Marcin Owsiany d055cbc8ca Make it apparent that absent fields in a record have a value of :absent, which is different from what appears in a line. 2007-10-06 13:24:01 +01:00
Rick Bradley a7d220b828 Moving the webrick/mongrel "servers" over to HTTPServer module instead of 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. 2007-10-05 19:51:47 -05:00
Luke Kanies f084d83df1 Another round of test-fixing around the changes I made
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.
2007-10-05 14:25:29 -05:00
Luke Kanies 9c58c476c2 Adding a :code setting for specifying code to run
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.
2007-10-05 11:46:35 -05:00
Luke Kanies 0e336bf62b This commit is focused on getting the 'puppet' executable
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.
2007-10-05 00:07:38 -05:00
Michael V. O'Brien 19ad238f16 Fixed #827. Applied a form of the patch provided by porridge and
wrote a test.
2007-10-04 14:42:45 -05:00
Luke Kanies 9236179fad Attempting to reproduce and fix #829 by applying patch by Paul. I could not
get a test to show the exception, nor could I figure out how the coding bug
could have actually had an impact, but it's an innocent-enough fix, so I'm fine
applying it.
2007-10-04 12:53:09 -05:00
Luke Kanies 35718437c4 Merge branch 'master' of ssh://reductivelabs.com/opt/rl/git/puppet
Conflicts:

	lib/puppet/defaults.rb
	lib/puppet/dsl.rb
2007-10-03 22:29:05 -05:00
Luke Kanies fd11603fe4 Removing the Id tags from all of the files 2007-10-03 21:55:41 -05:00
Luke Kanies bb3b3cedf4 I finally tracked down the problem that was causing providers
to sometimes suddenly disappear and thus tests to fail --
Kernel.require was not loading the normal ruby path (e.g.,
'puppet/type/cron'), so if someone else loaded that then
it would replace the in-memory type with a new one, but that
new one couldn't load its own providers, because the Kernel
would ignore the providers, thinking they were already loaded.

This doesn't fix all of the autoloading problems, but at least
we won't suddenly break a ton of tests.
2007-10-03 19:36:35 -05:00
David Lutterkort f1ec23a0e2 Merge branch 'master' of git://reductivelabs.com/puppet 2007-10-02 15:25:11 -07:00
David Lutterkort 8722e439b7 Use external helper script to talk to yum; should avoid any more trouble with "yum list". Fixes trac #836
Signed-off-by: David Lutterkort <dlutter@redhat.com>
2007-10-02 15:24:08 -07:00
Rick Bradley 1174d99acb Fixed a failing test where we presumed that non-string Fact values would have type preserved across a P::N::Client.master.facts call, which is not true. 2007-10-02 14:49:38 -05:00
Rick Bradley 7fe18e3ffb Fixed a test which was secretly sneaking off and pulling certs from ~ if they were there: Added set_mygroup method, removed duplicate setme method. Included PuppetTest in the XMLRPC servlect test. 2007-10-02 14:41:11 -05:00
Luke Kanies 4679f4dcc1 Merge branch 'indirection' of git://reductivelabs.com/puppet-luke 2007-09-25 00:43:15 -05:00
Luke Kanies 3a18348fdb Renaming the 'Puppet::Util::Config' class to
'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".
2007-09-22 17:54:46 -05:00
Luke Kanies d6e91ae786 Merge branch 'configurations' into indirection
Conflicts:

	lib/puppet/defaults.rb
	lib/puppet/indirector/facts/yaml.rb
	spec/unit/indirector/indirection.rb
	spec/unit/indirector/indirector.rb
2007-09-22 15:04:34 -05:00
Luke Kanies 86dde63473 All tests now pass in this configuration branch, which means
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.
2007-09-22 14:25:17 -05:00
Luke Kanies 60cd6a73b2 The structure for handling resource generation is now
in place, which means I'm over the hump in developing
this branch.

I have to fix some design flaws I made in the configurations,
particularly that the 'runner' handler needs to be able to
specify tags and whether to ignore schedules, but otherwise,
I think it's straightforward test- and bug-fixing from here out.
2007-09-22 12:56:32 -05:00
Luke Kanies 46d69068fa An intermediate commit so I can start working on a different
branch.  The file recursion code actually works for the first
time in a painful while, but there are still some quirks and design
issues to resolve, particularly around creating implicit resources
that then fail (i.e., the behaviour of the create_implicit_resource
method in Configuration).
2007-09-20 12:57:57 -05:00
Luke Kanies 9fa2628a84 This is basically another intermediate commit. I feel like
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.
2007-09-17 15:21:44 -07:00
Luke Kanies f17f19dae9 The whole system now uses Configuration objects instead of
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.
2007-09-15 22:17:20 -06:00
Luke Kanies 43f22a2414 Adding a to_graph method to TransBuckets, so that the buckets can directly 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. 2007-09-12 18:32:26 -05:00
Luke Kanies a6fe70054f Another intermediate commit. The node and fact classes are now functional 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. 2007-09-12 15:32:25 -05:00
Luke Kanies 3b3065bc73 Refactoring the feature support so it loads libraries when a feature is asked about, rather than when it is defined. 2007-09-11 18:48:30 -05:00
Luke Kanies c319fd059d Merge branch 'testing' 2007-09-11 16:34:07 -05:00
Luke Kanies 65c1501504 The Node handler is now obsolete. Node searching is handled through the indirector. I have not yet added the tests for the node handlers themselves, which is next. 2007-09-11 16:19:03 -05:00
Luke Kanies 5aa4440b6f Doing an intermediate commit so rick can look at the work I have done so far. 2007-09-11 12:38:56 -05:00
Luke Kanies bb69a1f08a Renaming the instance loader method to "instance_load". It was previously autoload, which could class with Kernel.autoload. 2007-09-10 17:58:23 -05:00
Michael V. O'Brien 19a748bb9e Removed TYPE token, replacing it with CLASSREF token, in the grammar and lexer. Updated CLASSREF token regex in the lexer. 2007-09-10 14:28:02 -05:00
Michael V. O'Brien 041393d146 Fixed #774, which fixed fully qualified collection statements 2007-09-10 12:33:26 -05:00
Luke Kanies 6700adcacd *Finally* fixing the tests that were failing around users and groups. The problem was that the autoload tests were somehow clearing all loaded classes, including the providers. This is fixed now. 2007-09-07 15:38:24 -05:00
Luke Kanies 9af79f1172 Fixing some failed tests. Mostly cleanup. Next is to make all of the user tests pass again, dammit. 2007-09-07 12:10:59 -05:00
Luke Kanies 50874b2f18 Fixing a path test. I have now made the path stuff a lot cleaner, but it apparently broke this test. 2007-09-07 11:00:13 -05:00
Luke Kanies ca57c793d4 Fixing #801 -- resources that have changes when running in noop mode do not record that they were checked, so that they will be scheduled on the next run. This is a somewhat murky solution, but considering that no one had submitted this bug before, I expect it will not hit many people. 2007-09-07 10:58:07 -05:00
Luke Kanies caad11a9d1 Fixing some broken tests in the master client, and adding a test for #800 but it is unfortunately disabled because we cannot realistically fix it using the current design. It will be easy after the REST refactor, though. 2007-09-06 20:50:26 -05:00
Luke Kanies 7abc78ad25 Fixing #795 -- configuration elements now make sure all file paths are fully qualified by prepending the wd to unqualified path names. 2007-09-06 20:12:30 -05:00
Luke Kanies 4212f9c225 Fixing #802 -- tags are now applied before parent classes are evaluated, so parent classes can use tagged() to test if a node is a member of a subclass. 2007-09-06 20:00:24 -05:00
Luke Kanies b7f42441b9 Renaming some ast resource classes and files so they make a lot more sense. 2007-09-06 18:53:00 -05:00
Luke Kanies 653c1514b6 Fixing #806. Resources correctly look up their fully qualified definition type, just like resource references do, which causes the resource and reference to again agree on the full name of a given defined type. 2007-09-06 18:45:41 -05:00
Luke Kanies b0a947589e Flipped the switch so that compiles now return a Configuration instance instead of pre-extracting the configuration. 2007-09-04 16:59:30 -05:00
Luke Kanies 11b127bd67 Successfully modified all tests and code so that all language tests pass again. This is the majority of the work necessary to make the separate "configuration" object work. 2007-09-04 15:14:39 -05:00
Luke Kanies 3b2efd2a4b We now have a real configuration object, as a subclass of GRATR::Digraph, 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. 2007-09-04 12:09:48 -05:00
Luke Kanies 0faf76ee18 More refactoring. I have removed a few more extraneous methods from Scope, 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. 2007-09-03 19:38:15 -05:00
Luke Kanies 9d70b9746c Removing the Scope#setresource method, since it was essentially redundant. The work is done in either AST::ResourceDef#evaluate or Compile#store_resource. 2007-09-03 18:20:04 -05:00
Luke Kanies b021587e30 Doing a small amount of refactoring, toward being able to use Parser 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. 2007-09-03 18:01:00 -05:00
Luke Kanies 25f6d7c521 Deleting old documentation that somehow made it back into the tree in the 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. 2007-09-01 09:51:03 -05:00
Luke Kanies 6832a4b08e Fixing some failing unit tests. 2007-08-28 16:15:05 -05:00
Luke Kanies 2625eb1db7 Making a couple of small bugfixes in the configuration subsystem 2007-08-27 17:38:39 -05:00
Luke Kanies 1de5ae0da0 Adding support for providing a diff when files are being changed. Currently uses a local diff binary, but could easily be changed to use the ruby diff/lcs library. Modified puppet and puppetd to automatically show file diffs when in noop mode, but can otherwise be enabled using --show_diff. This only works when running interactively, because the diffs are printed on stdout. 2007-08-27 14:26:49 -05:00
Luke Kanies 11081ce886 Multiple environment support now works, and I have even tested it in real life. This commit is mostly a bug-fix commit, resulting from the difference between real-life testing and unit testing. 2007-08-26 21:54:17 -05:00
Luke Kanies 9ea8e6cc87 The fileserver now uses an environment-specific module path. I also made various bug fixes around the network tree. 2007-08-26 19:03:25 -05:00
Luke Kanies a8f2a33c7e Moving the node tests to rspec, and cleaning up the spec of the node, especially WRT the environment. 2007-08-26 12:53:36 -05:00
Luke Kanies 9df4fd1f21 And we have multiple environment support in the parser. The only remaining 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). 2007-08-25 17:14:13 -05:00
Luke Kanies 37f0eed965 Renaming the "configuration" object to "compile", because it is only a 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. 2007-08-25 15:54:06 -05:00
Luke Kanies 3030d3eb3f Modules are now tested with spec, and they now can handle environment-specific module paths. 2007-08-25 15:47:49 -05:00
Luke Kanies c6e201cdd4 I have added basic support for a search path, altho not yet with any ability to manipulate it. All config tests pass in both the old tests and the new ones, so it is time to add the hooks for manipulating the search path. 2007-08-24 18:31:00 -05:00
Luke Kanies 520aaafbb8 Adding some rspec tests for Config.rb, because I am planning on significantly changing its internals and the current tests, I think, will be harder to migrate than just writing rspec tests from scratch. 2007-08-23 19:09:45 -05:00
Luke Kanies 724fef1269 Everything up to the parser (and the Modules) is ready to support multiple 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). 2007-08-23 13:25:40 -05:00
Luke Kanies 58494cc856 Building a stand-alone spec directory for creating the new spec-based tests. 2007-08-23 11:52:31 -05:00
Luke Kanies d59315a07a Adding the second half of the rspec upgrade -- apparently the "git add" thing I used did not remove the old files, only add the new ones. 2007-08-23 01:17:33 -05:00
Luke Kanies 5601ecf75d Upgrading rspec to version 1.0.8. This only includes the contents of the lib directory, and even then only the spec-related stuff, not the autotest stuff. 2007-08-23 00:56:42 -05:00
Luke Kanies 7c4d39ec09 Adding environment information to the client fact list. The environment is retrieved from the normal Puppet configuration, so it is set via puppet.conf or the cli, rather than being a normal fact. 2007-08-22 22:13:23 -05:00
Luke Kanies b599862fc8 Fixing the integration test between interpreter and configuration -- the interpreter was not passing on that the config should use ast nodes 2007-08-22 21:39:21 -05:00
Luke Kanies eeedb9200f Merge branch 'master' of ssh://reductivelabs.com/home/michael/git/puppet 2007-08-22 19:00:48 -05:00
Luke Kanies b9f529a063 Merging the multi_env branch with master. There are not actually any conflicts, so this commit might only be necessary because I did not pull sufficiently often. 2007-08-22 18:07:52 -05:00
Luke Kanies 8b3361afae The last commits before I actually start on the multi-environment support. There are still failing tests, but apparently only those that are also failing in trunk. 2007-08-22 17:57:28 -05:00
Luke Kanies f1727f18ab Adding the topscope metadata to the configuration being returned to the client, just like it expects, and fixing how the resource handler calls the master type. 2007-08-22 16:14:39 -05:00
Michael V. O'Brien efcd1e88f7 Fixed CA race condition (#693) 2007-08-22 11:31:25 -05:00
Luke Kanies 4eb87ed7c8 A round of bugfixing. Many more tests now pass -- I think we are largely down to tests that (yay!) fail in trunk. 2007-08-20 22:25:00 -05:00