<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puppet.git/spec/integration, branch ticket/master/7841</title>
<subtitle>Puppet repo</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/'/>
<entry>
<title>(#8663) Exclude git rev-parse HEAD spec test on Windows</title>
<updated>2011-08-19T20:52:59+00:00</updated>
<author>
<name>Josh Cooper</name>
<email>josh@puppetlabs.com</email>
</author>
<published>2011-08-04T23:41:11+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=80092091fb986eb013a12045cdb5f0efe3490702'/>
<id>80092091fb986eb013a12045cdb5f0efe3490702</id>
<content type='text'>
When running spec/integration/parser/compiler_spec.rb, the git command
passed to Puppet::Util.execute is an array containing a single string
["git rev-parse HEAD"]. On Unix, it calls Kernel.exec(*command), but on
Windows it calls Process.create(:command_line =&gt;command), which attempts
to execute the program called "git rev-parse HEAD" and fails:

CreateProcess() failed: The system cannot find the file specified.

This commit marks the test as fails_on_windows, and will be re-enabled
when #8410 is fixed.

Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
(cherry picked from commit 7ca187509ce954e5b2707212a5615dbb9eb20378)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running spec/integration/parser/compiler_spec.rb, the git command
passed to Puppet::Util.execute is an array containing a single string
["git rev-parse HEAD"]. On Unix, it calls Kernel.exec(*command), but on
Windows it calls Process.create(:command_line =&gt;command), which attempts
to execute the program called "git rev-parse HEAD" and fails:

CreateProcess() failed: The system cannot find the file specified.

This commit marks the test as fails_on_windows, and will be re-enabled
when #8410 is fixed.

Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
(cherry picked from commit 7ca187509ce954e5b2707212a5615dbb9eb20378)
</pre>
</div>
</content>
</entry>
<entry>
<title>Check for the appropriate permissions in File type tests on Windows</title>
<updated>2011-08-19T20:52:58+00:00</updated>
<author>
<name>Jacob Helwig</name>
<email>jacob@puppetlabs.com</email>
</author>
<published>2011-08-02T19:19:47+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=a0013e4b2d802f7d10e913da9b89ea912b1564bd'/>
<id>a0013e4b2d802f7d10e913da9b89ea912b1564bd</id>
<content type='text'>
Ruby's interface to the permissions on Windows does not map well to
the *nix concept of User, Group, and Other.  On Windows directories
don't get the execute bit, and Ruby cannot manage group, and other via
the standard chmod interfaces.

Because of this, we no longer check that the execute bit is set on
Windows, and use a permission set that will show differences if we
fail to set the permissions on Windows.

Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
(cherry picked from commit 447c1171845d8d17e4e684c9508fddecc003d15e)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ruby's interface to the permissions on Windows does not map well to
the *nix concept of User, Group, and Other.  On Windows directories
don't get the execute bit, and Ruby cannot manage group, and other via
the standard chmod interfaces.

Because of this, we no longer check that the execute bit is set on
Windows, and use a permission set that will show differences if we
fail to set the permissions on Windows.

Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
(cherry picked from commit 447c1171845d8d17e4e684c9508fddecc003d15e)
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove :fails_on_windows from file type tests that no longer fail on Windows</title>
<updated>2011-08-19T20:52:58+00:00</updated>
<author>
<name>Jacob Helwig</name>
<email>jacob@puppetlabs.com</email>
</author>
<published>2011-08-02T18:57:38+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=58c7dacef62679c9e2ec5fd889d224978ed8c0d6'/>
<id>58c7dacef62679c9e2ec5fd889d224978ed8c0d6</id>
<content type='text'>
With the previous changes to the file bucket and the handling of what
is considered an absolute path, enough pieces have slid into place
that the file type is now mostly working on Windows.

Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
(cherry picked from commit 6385e08004ff06b709cc874870de38c078adb791)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the previous changes to the file bucket and the handling of what
is considered an absolute path, enough pieces have slid into place
that the file type is now mostly working on Windows.

Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
(cherry picked from commit 6385e08004ff06b709cc874870de38c078adb791)
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable symlink related file tests on Windows</title>
<updated>2011-08-19T20:52:58+00:00</updated>
<author>
<name>Jacob Helwig</name>
<email>jacob@puppetlabs.com</email>
</author>
<published>2011-08-02T17:23:08+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=2efaa855e9ef9079342ba041c103832313696582'/>
<id>2efaa855e9ef9079342ba041c103832313696582</id>
<content type='text'>
While Windows filesystems typically have support for symlinks (NTFS),
there are no immediate plans to support symlinks on Windows.

Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
(cherry picked from commit 207d41f798356d7001f5de971e118e3c33d5f6d1)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While Windows filesystems typically have support for symlinks (NTFS),
there are no immediate plans to support symlinks on Windows.

Reviewed-by: Nick Lewis &lt;nick@puppetlabs.com&gt;
(cherry picked from commit 207d41f798356d7001f5de971e118e3c33d5f6d1)
</pre>
</div>
</content>
</entry>
<entry>
<title>(#8663) Disable spec tests for unsupported functionality on Windows</title>
<updated>2011-08-19T20:52:57+00:00</updated>
<author>
<name>Josh Cooper</name>
<email>josh@puppetlabs.com</email>
</author>
<published>2011-07-28T00:04:45+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=925af9586a0e209a031c46c81225c6925837a49a'/>
<id>925af9586a0e209a031c46c81225c6925837a49a</id>
<content type='text'>
The mount, shell, and ssh_authorized_key types are not supported on
Windows, so these spec tests have been disabled when running on
Windows.

One of the compiler spec tests fails on Windows because
Puppet::Util.execute attempts to execute a program named "git rev-parse
HEAD". This has different semantics than Unix, where the command is
splatted, Kernel.exec(*command). Since this truly is a Windows bug, I
removed the fails_on_windows tag and updated ticket #8410.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit d9ce88d10707268fe41c8f3ad1166137fe8e202f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mount, shell, and ssh_authorized_key types are not supported on
Windows, so these spec tests have been disabled when running on
Windows.

One of the compiler spec tests fails on Windows because
Puppet::Util.execute attempts to execute a program named "git rev-parse
HEAD". This has different semantics than Unix, where the command is
splatted, Kernel.exec(*command). Since this truly is a Windows bug, I
removed the fails_on_windows tag and updated ticket #8410.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit d9ce88d10707268fe41c8f3ad1166137fe8e202f)
</pre>
</div>
</content>
</entry>
<entry>
<title>(#8663) Reenable spec tests on Windows that now pass</title>
<updated>2011-08-19T20:52:57+00:00</updated>
<author>
<name>Josh Cooper</name>
<email>josh@puppetlabs.com</email>
</author>
<published>2011-07-27T22:28:21+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=9fbb0be88daec8def1cca622cd4045d4eda7a3b5'/>
<id>9fbb0be88daec8def1cca622cd4045d4eda7a3b5</id>
<content type='text'>
The cacher was causing spec tests to fail due to Time.now not having
millisecond resolution on Windows. Now that usage of the cacher has
been removed from many places, these tests now pass.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit 9e502ed121847fe4fcca90453c0520b53103d17d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The cacher was causing spec tests to fail due to Time.now not having
millisecond resolution on Windows. Now that usage of the cacher has
been removed from many places, these tests now pass.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit 9e502ed121847fe4fcca90453c0520b53103d17d)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix issue with forward and backslashes in Windows paths</title>
<updated>2011-08-19T20:52:57+00:00</updated>
<author>
<name>Josh Cooper</name>
<email>josh@puppetlabs.com</email>
</author>
<published>2011-07-22T19:44:15+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=ad29bf6114f637adfd686e88535aa79bc8cae7b8'/>
<id>ad29bf6114f637adfd686e88535aa79bc8cae7b8</id>
<content type='text'>
The environment validates its modulepath and manifestdir settings, but
it uses Dir.getwd to convert a relative path into an absolute path. The
problem is that on Windows, Dir.getwd returns a path with backslashes.
(Interestingly this only happens when puppet is loaded, not in irb for
example.) And since we do not yet support backslashes in Windows paths
or UNC paths, the directory is not included in the environment.

For the time being, I am using File.expand_path to normalize the path.
It has the side-effect of converting backslashes to forward slashes.
This is sufficient to work around backslashes in Dir.getwd. In the near
future, I will be refactoring how paths are split, validated, tested,
etc, and I have a REMIND in place to fix the environment.

But as a result of this change it exposed a bug in our rdoc parser
dealing with the finding the root of a path. The parser assumed that the
root was '/', but caused an infinite loop when passed a Windows path.

I added a test for this case, which is only run on Windows, because on
Unix File.dirname("C:/") == '.'.

After all of that, I had to disable one of the rdoc spec tests, because
it attempted to reproduce a specific bug, which caused rdoc to try to
create a directory of the form: C:/.../files/C:/.... Of course, this
fails because ':' is not a valid filename character on Windows.

Paired-with: Nick Lewis &lt;nick@puppetlabs.com&gt;
Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit 9279d0954eb20d75e18a666fd572b5492e157608)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The environment validates its modulepath and manifestdir settings, but
it uses Dir.getwd to convert a relative path into an absolute path. The
problem is that on Windows, Dir.getwd returns a path with backslashes.
(Interestingly this only happens when puppet is loaded, not in irb for
example.) And since we do not yet support backslashes in Windows paths
or UNC paths, the directory is not included in the environment.

For the time being, I am using File.expand_path to normalize the path.
It has the side-effect of converting backslashes to forward slashes.
This is sufficient to work around backslashes in Dir.getwd. In the near
future, I will be refactoring how paths are split, validated, tested,
etc, and I have a REMIND in place to fix the environment.

But as a result of this change it exposed a bug in our rdoc parser
dealing with the finding the root of a path. The parser assumed that the
root was '/', but caused an infinite loop when passed a Windows path.

I added a test for this case, which is only run on Windows, because on
Unix File.dirname("C:/") == '.'.

After all of that, I had to disable one of the rdoc spec tests, because
it attempted to reproduce a specific bug, which caused rdoc to try to
create a directory of the form: C:/.../files/C:/.... Of course, this
fails because ':' is not a valid filename character on Windows.

Paired-with: Nick Lewis &lt;nick@puppetlabs.com&gt;
Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit 9279d0954eb20d75e18a666fd572b5492e157608)
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable spec tests for unsupported functionality on Windows</title>
<updated>2011-08-19T20:52:57+00:00</updated>
<author>
<name>Josh Cooper</name>
<email>josh@puppetlabs.com</email>
</author>
<published>2011-07-22T19:34:05+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=eaa7d92f4017fcdae54e5f6addf1edd3a72fe384'/>
<id>eaa7d92f4017fcdae54e5f6addf1edd3a72fe384</id>
<content type='text'>
Ruby does not support creating symlinks on Windows (though Windows does
support them), and since the tidy spec test is designed to reproduce a
specific bug (as opposed to testing symlink functionality on Windows) it
has been disabled.

Ruby on Windows also does not support File.chmod, so the inspect spec
test has been disabled. The general issue of File.chmod on Windows is
something I know needs to be investigated.

Also disabled the cron spec test as this functionality will not be
supported on Windows (instead there will be task manager support).

Re-enable the autoload spec tests as those now pass on Windows (this is
probably due to the cacher changes recently made).

The inventory ssl spec is not supported on Windows and so is disabled.
However, while researching the failure, it was due to
Time.now.strftime("%Z") returning "Pacific Daylight Time" on Windows,
instead of "PDT" like it does on other platforms. As a result, the split
method was sometimes splitting in the wrong place.

As far as I can tell, the inventory code is only called from the CA (to
keep track of serial numbers for certs that it has issued). But it's
something to watch out for on Windows when calling strftime.

Webrick, fileserver and CA functionality are not supported on Windows so
these spec tests are disabled.

Also fix path issue with catalog spec.

Also several spec tests were creating tempfiles manually and calling
system("rm -rf ..."), these have been replaced with
PuppetSpec::Files.tmpdir.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit 75d2e62cab1de7677463c274892f8920cb7e0cbf)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ruby does not support creating symlinks on Windows (though Windows does
support them), and since the tidy spec test is designed to reproduce a
specific bug (as opposed to testing symlink functionality on Windows) it
has been disabled.

Ruby on Windows also does not support File.chmod, so the inspect spec
test has been disabled. The general issue of File.chmod on Windows is
something I know needs to be investigated.

Also disabled the cron spec test as this functionality will not be
supported on Windows (instead there will be task manager support).

Re-enable the autoload spec tests as those now pass on Windows (this is
probably due to the cacher changes recently made).

The inventory ssl spec is not supported on Windows and so is disabled.
However, while researching the failure, it was due to
Time.now.strftime("%Z") returning "Pacific Daylight Time" on Windows,
instead of "PDT" like it does on other platforms. As a result, the split
method was sometimes splitting in the wrong place.

As far as I can tell, the inventory code is only called from the CA (to
keep track of serial numbers for certs that it has issued). But it's
something to watch out for on Windows when calling strftime.

Webrick, fileserver and CA functionality are not supported on Windows so
these spec tests are disabled.

Also fix path issue with catalog spec.

Also several spec tests were creating tempfiles manually and calling
system("rm -rf ..."), these have been replaced with
PuppetSpec::Files.tmpdir.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit 75d2e62cab1de7677463c274892f8920cb7e0cbf)
</pre>
</div>
</content>
</entry>
<entry>
<title>Update certificate spec tests for Windows</title>
<updated>2011-08-19T20:52:56+00:00</updated>
<author>
<name>Josh Cooper</name>
<email>josh@puppetlabs.com</email>
</author>
<published>2011-07-22T19:29:54+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=945bf74aad13de37d5ca46961db78a72b8c24029'/>
<id>945bf74aad13de37d5ca46961db78a72b8c24029</id>
<content type='text'>
Disable CA related spec tests on Windows, since that functionality is not supported.

Some cert spec tests are still marked as fails_on_windows because
settings attempts to create and apply a catalog corresponding to
ssl/cert related directories. This fails because on Windows
Puppet.features.root?  always returns true (which is a separate bug),
and as a result attempts to set the owner and group, which fails because
the provider is not implemented yet on Windows.

Also many of these tests were using Tempfile.new and trying to
system("rm -rf ...") later. I changed these to use
PuppetSpec::Files.tmpdir instead, which automatically cleans up
temporary directories after the tests have run.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit 95837e6d3e74648617c308aedc52192bb13fde5a)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Disable CA related spec tests on Windows, since that functionality is not supported.

Some cert spec tests are still marked as fails_on_windows because
settings attempts to create and apply a catalog corresponding to
ssl/cert related directories. This fails because on Windows
Puppet.features.root?  always returns true (which is a separate bug),
and as a result attempts to set the owner and group, which fails because
the provider is not implemented yet on Windows.

Also many of these tests were using Tempfile.new and trying to
system("rm -rf ...") later. I changed these to use
PuppetSpec::Files.tmpdir instead, which automatically cleans up
temporary directories after the tests have run.

Reviewed-by: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit 95837e6d3e74648617c308aedc52192bb13fde5a)
</pre>
</div>
</content>
</entry>
<entry>
<title>Rework Puppet::Util::Cacher to only expire using TTLs</title>
<updated>2011-08-19T20:52:56+00:00</updated>
<author>
<name>Nick Lewis</name>
<email>nick@puppetlabs.com</email>
</author>
<published>2011-07-21T18:53:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=49d1e9da1381c77a3873965bad36ba6b33316882'/>
<id>49d1e9da1381c77a3873965bad36ba6b33316882</id>
<content type='text'>
We have removed every usage of cached_attr in which the attribute needs to be
manually expired. Thus, the only meaningful behavior provided by
Puppet::Util::Cacher is expiration based on TTLs. This commit reworks the
cacher to only support that behavior.

Rather than accepting an options hash, of which :ttl is the only available
option, cached_attr now requires a second argument, which is the TTL.

TTLs are now used to compute expirations, which are stored and used for
expiring values. Previously, we stored a timestamp and used it and the TTL to
determine whether the attribute was expired. This had the potentially
undesirable side effect that the lifetime of a cached attribute could be
extended after its insertion by modifying the TTL setting for the cache. Now,
the lifetime of an attribute is determined when it is set, and is thereafter
immutable, aside from deliberately re-setting the expiration for that
particular attribute.

Reviewed-By: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit d198fedf65e472b384666fc9ae3bef487852068a)

Conflicts:

	spec/integration/node/facts_spec.rb
	spec/unit/node_spec.rb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have removed every usage of cached_attr in which the attribute needs to be
manually expired. Thus, the only meaningful behavior provided by
Puppet::Util::Cacher is expiration based on TTLs. This commit reworks the
cacher to only support that behavior.

Rather than accepting an options hash, of which :ttl is the only available
option, cached_attr now requires a second argument, which is the TTL.

TTLs are now used to compute expirations, which are stored and used for
expiring values. Previously, we stored a timestamp and used it and the TTL to
determine whether the attribute was expired. This had the potentially
undesirable side effect that the lifetime of a cached attribute could be
extended after its insertion by modifying the TTL setting for the cache. Now,
the lifetime of an attribute is determined when it is set, and is thereafter
immutable, aside from deliberately re-setting the expiration for that
particular attribute.

Reviewed-By: Jacob Helwig &lt;jacob@puppetlabs.com&gt;
(cherry picked from commit d198fedf65e472b384666fc9ae3bef487852068a)

Conflicts:

	spec/integration/node/facts_spec.rb
	spec/unit/node_spec.rb
</pre>
</div>
</content>
</entry>
</feed>
