summaryrefslogtreecommitdiff
path: root/spec/integration/faces
AgeCommit message (Collapse)AuthorFilesLines
2014-06-03(maint) Remove unnecessary setting of modulepath from face help specJosh Partlow1-4/+0
The integration spec checking help output for the faces was setting modulepath directly in the body of an RSpec context block. This caused modulepath to be set on test file load. Normally, this is not an issue, since most specs are not sensitive to the Puppet modulepath setting, and the test_helper clears all settings in its after_each_test hook. However, a recent run of specs on Solaris master just happened to run with the very first spec being sensitive to modulepath (spec/integration/directory_environments_spec.rb) which then failed. Fortunately, the current version of puppet no longer requires this early setting of modulepath for the documentation spec to run, so I'm just removing it here.
2014-04-29(maint) Fix plugin spec to work with facter 1.7.5Josh Partlow1-6/+14
Puppet does not consider Facter 1.7.5 to provide external_facts, so the pluginfacts step was being skipped when specs were run with Facter 1.7.5. Altered the plugin spec to work with the application rather than the face so that we can check the rendered output, and to generate lib and facts.d dirs to normalize the output (otherwise the downloader reports the creation of the base plugin target directories, something which normally would be handled by Puppet's Settings catalog). As part of this, I noticed that the plugin face would return different results. If external facts were supported, it would return the list of any external facts pluginsynced. Otherwise it would return the list of any plugins pluginsynced. Changed this to accumlate and list both sets of changes.
2014-04-28(maint) Provide a namespace around two specs using Memory indirectorsJosh Partlow1-0/+2
Two specs were using the same constant names to track classes that they were generating Memory indirector classes for. Because specs share the same module namespace, they were overwriting one another on load and causing spec order failures. Guarding the specs within a namespace module should keep them isolated and prevent them for unexpectedly tinkering with one another's test setup.
2014-04-28(PUP-1699) Add remote environment to plugin downloader callsJosh Partlow1-0/+52
Puppet::Configurer::Downloader is also called by the plugin face, but we were not submitting an environment there. On Ruby 1.9.3 this nil environment was being interned as :'' and would produce a failure server side when a request with an empty environment was parsed. On Ruby 1.8.7, nil raises an error when interned and it was failing much sooner on the agent side. To resolve this, we're passing in a reference to the configured environment. Also added an integration test for the plugin face, because we weren't seeing any failure in our test suite.
2012-10-04Revert "Merge pull request #1190 from ↵Jeff McCune1-3/+1
jeffmccune/fix/master/7316_load_faces_from_modulepath_try4" This reverts commit bdda511d06ed6f89b58343e815585957a33db94e, reversing changes made to 8f9699cee0d1028d538b0a26aa5bc885751b6d46. Conflicts: lib/puppet/settings/config_file.rb
2012-09-26Revert "Revert "Merge branch 'fix/3.x/7316_load_faces_from_modulepath_try3' ↵Jeff McCune1-1/+3
into 3.x"" This reverts commit ef3fe695fd0be5ff2b5aeb563f34f62a0f503831.
2012-09-26(Maint) Remove rspec from shebang lineJeff McCune2-2/+2
Without this patch Ruby 1.9 is still complaining loudly about trying to parse the spec files. The previous attempt to clean up this problem in edc3ddf works for Ruby 1.8 but not 1.9. I'd prefer to remove the shebang lines entirely, but doing so will cause encoding errors in Ruby 1.9. This patch strives for a happy middle ground of convincing Ruby it is actually working with Ruby while not confusing it to think it should exec() to rspec. This patch is the result of the following command run against the source tree: find spec -type f -print0 | \ xargs -0 perl -pl -i -e 's,^\#\!\s?/(.*)rspec,\#! /usr/bin/env ruby,'
2012-09-25Revert "Merge branch 'fix/3.x/7316_load_faces_from_modulepath_try3' into 3.x"Andrew Parker1-3/+1
This reverts commit b277bb3874ecd50e1cd6e600bf6d36e3240d5510, reversing changes made to bdf193640701e9a107b1c6f6661499b31fdefb4d. These changes are being backed out because they referenced a undefined methods (`default_global_config_dir` and `default_global_var_dir`). After fixing that locally, there was still a problem with `puppet help` printing out a large number of warnings because it could not load face code correctly. I think we need to step back from this, re-evaluate what is happening, and try a new approach.
2012-09-24Revert "Merge branch 'revert/3.x/faces_from_modulepath' into 3.x"Jeff McCune1-1/+3
This is a "revert-the-revert" commit. This reverts commit 87ea7a8849f90a232f2bb683fb8a2ce1573a21db, reversing changes made to 8dff14b9c5a3cdd99ede63dbcbb2dbe00b457926.
2012-09-21(#13435) Use digest algorithm from CSR for fingerprintPatrick Carlisle1-15/+10
Since the digest algoritm changed between Puppet 2.7 and 3.0 from MD5 to SHA256, there was a problem when submitting a CSR from a 2.7 agent to a 3.0 master. The agent would display the fingerprint using MD5, and the master would display the SHA256 fingerprint, making it impossible to verify using the normal puppet commands. This makes the default digest algorithm for each CSR the algorithm that was used to generate the signature. This will be MD5 for a CSR generated on 2.7, and SHA256 for a CSR generated on 3.0. When showing a fingerprint puppet will now always print the digest algorithm that was used. All fingerprinting commands should also accept a --digest option to specify the digest. It also significantly refactors and unifies the code used to generate and display fingerprints. It introduces a new class, Puppet::SSL::Digest, to encapsulate digest data, and uses this everywhere a digest is needed.
2012-09-19Set ca_location in ca facePatrick Carlisle1-1/+1
The ca face was not properly setting ca_location, and therefore not setting the terminus correctly for Puppet::SSL::Certificate or CertificateRequest. Because of this, the ca face would not read all available certificates, for example certs waiting to be signed.
2012-07-24Merge branch '2.7.x' into 3.xPatrick Carlisle1-1/+1
* 2.7.x: Use rspec 2.11 compatible block syntax Conflicts: spec/integration/faces/ca_spec.rb spec/integration/network/server/mongrel_spec.rb spec/unit/application_spec.rb spec/unit/face/help_spec.rb spec/unit/network/handler/fileserver_spec.rb spec/unit/parser/functions/create_resources_spec.rb spec/unit/provider/nameservice/directoryservice_spec.rb spec/unit/type/file_spec.rb spec/unit/type_spec.rb
2012-07-18Merge branch 'maint/master/conditional-pending' of ↵Andrew Parker1-2/+0
https://github.com/joshcooper/puppet into 3.x * 'maint/master/conditional-pending' of https://github.com/joshcooper/puppet: Maint: Actually execute the tests on non-windows platforms (#14441) Require instrumentation indirections Make Puppet's gem package task the same name as other Puppetlabs' projects (maint) Make 3.0.x work with rspec-puppet Re-enable this test to work on windows Change one test to use the new confine syntax.
2012-07-02(maint) Standardize on /usr/bin/env ruby -S rspecJeff McCune2-2/+2
Without this patch some spec files are using `ruby -S rspec` and others are using `rspec`. We should standardize on a single form of the interpreter used for spec files. `ruby -S rspec` is the best choice because it correctly informs editors such as Vim with Syntastic that the file is a Ruby file rather than an Rspec file.
2012-06-26(Maint) Moved ca test to correct locationAndrew Parker1-0/+359
The ca face test is an integration test as it uses the file system, depends on time, and is failry slow to run (8s for ~100 tests on my laptop).
2012-06-14Maint: Actually execute the tests on non-windows platformsJosh Cooper1-2/+0
Previously, the tests were using conditional pending statements to mark tests that don't pass on Windows: describe "group" do pending("porting to Windows", :if => ...) do it "should ..." do ... end it "should ..." do ... end end end But this is not a valid use of conditional pending statements, and it causes the examples within the pending block to be silently skipped. Instead, the conditional pending statement needs to be within the example: it "should ..." do pending("porting to Windows", :if => ...) do ... end end In our case, we want to mark a set of examples as pending, so we use an rspec exclude filter instead: describe "something", :unless => Puppet.features.microsoft_windows? do Some tests now pass on Windows, using :file instead of :mount and the instrumentation documentation, so I enabled them.
2012-04-18(Maint) Mark failing tests as pending on WindowsJosh Cooper1-0/+2
A previous commit removed the fails_on_windows tag but did not add the conditional pending block. Additional changes were made to faces documentation that do not work on Windows. This commit just adds a conditional pending block as was done in a previous commit, e.g. for the mount type.
2012-04-09Fix loading of faces in specsPatrick Carlisle1-28/+35
Iterating over faces outside of a test causes problems because the run mode is not set properly. Moving this inside of actual test cases allows the spec helper to fake any necessary setup. Changes due to Chris Price
2012-04-05(#13636) Update Module Face copyright dateKelsey Hightower1-1/+1
Quite a bit of code changed for the module tool in 2012, updating the copyright to reflect that fact. This patch also loosens the restrictions on what is considered a valid copyright date; removing the limited of 2011 to 20xx. Sucks for the developer in the year 2100.
2011-04-27(#6962) Add integration tests on Face documentation.Daniel Pittman1-0/+55
We now run all the faces, and their actions, as well as global help through the wringer in this test: this way we can be confident that we have, at least, the ability to generate the help without a user-visible failure. We also check that we have set copyright and license terms in our own faces. Theoretically this might fail if the end user has extra faces on LOAD_PATH, but my hope is that we won't hit that...