summaryrefslogtreecommitdiff
path: root/spec/unit/provider/package/pip_spec.rb
AgeCommit message (Collapse)AuthorFilesLines
2013-06-20(#21324) Pip provider query should be case insensitive.W. Andrew Loe III1-0/+16
The `pip` provider will repeatedly install a package if the case does not match what is in `pip freeze`.
2013-05-17(maint) Reset confines on the pip provider after testsPatrick Carlisle1-0/+4
The tests for pip alter the confines for the pip provider by stubbing the underlying facter calls and then calling lazy_pip. This can leak into later tests, causing weird failures.
2013-01-17(#15980) wrapping tests so that they're tested on both 'RedHat' and 'NotJared Curtis1-31/+35
Redhat' sytems
2013-01-17(#15980) Tests to confirm functionality of the cmd functionJared Curtis1-0/+14
2013-01-17(#15980) Test to verify that pip-python is used on Redhat systemsJared Curtis1-0/+6
2012-11-08(maint) Add expectation pip does not use -e flagJeff McCune1-0/+10
Without this patch we don't have an automated way to validate the expectation that the pip package provider does not execute with the `-e` flag present. This patch makes this expectation explicit and automatically verifiable.
2012-11-03Removing -e options from pip provider.Dave Dash1-2/+2
-e causes a few problems with puppet: 1. it tries to install to /root/src. 2. It makes the items editable, which isn't useful. 3. reapplying puppet will cause pip to re-install. Removing -e should help.
2012-09-26(Maint) Remove rspec from shebang lineJeff McCune1-1/+1
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-07-02(maint) Standardize on /usr/bin/env ruby -S rspecJeff McCune1-1/+1
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-01-21(#11961) Apply and catch a timeout when contacting PyPI over XMLRPCDominic Cleal1-4/+10
Apply a 10 second timeout to XMLRPC calls to PyPI and catch them, reporting an error gracefully.
2012-01-17(#11958) Improve error msg for missing pip commandKelsey Hightower1-0/+7
Without this patch the pip package provider does not produce a user friendly error message when the pip command is not available. The current error message looks like this: err: /Stage[main]/Dummy/Package[virtualenv]/ensure: change from absent to present failed: Could not set 'present on ensure: undefined method `pip' for #<Puppet::Type::Package::ProviderPip:0xb6cf6cd0> at /etc/puppet/modules/dummy/manifests/init.pp:5 This patch improves the error message by passing a string argument, 'Could not locate the pip command.', when raising the `NoMethodError`. The new error message looks like this: err: /Stage[main]/Dummy/Package[virtualenv]/ensure: change from absent to present failed: Could not set 'present on ensure: Could not locate the pip command. at /etc/puppet/modules/dummy/manifests/init.pp:5 This patch also includes updated spec tests validating this change. No other behavior changes are being introduced.
2011-05-10(#7468) Stub spec that tries to connect to pypi.python.orgMatt Robinson1-20/+24
I noticed a test failure when I ran the specs without an internet connection. Specs should never need an internet connection to pass. Reviewed-by: Max Martin <max@puppetlabs.com>
2011-04-13maint: clean up the spec test headers in bulk.Daniel Pittman1-2/+1
We now use a shebang of: #!/usr/bin/env rspec This enables the direct execution of spec tests again, which was lost earlier during the transition to more directly using the rspec2 runtime environment.
2011-04-08maint: just require 'spec_helper', thanks rspec2Daniel Pittman1-1/+1
rspec2 automatically sets a bunch of load-path stuff we were by hand, so we can just stop. As a side-effect we can now avoid a whole pile of stupid things to try and include the spec_helper.rb file... ...and then we can stop protecting spec_helper from evaluating twice, since we now require it with a consistent name. Yay. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
2011-03-22(#6527) Fix pip testsMatt Robinson1-4/+5
The testing of lazypip forgot to stub which, so they worked when pip was installed, but didn't work when it wasn't. Appropriate stubbing has been put in place, and stubs changed to expects for some stronger assertions about what's happening. Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
2011-03-22(#6527) Fix uninstall problem and refactorMatt Robinson1-56/+42
Uninstall wasn't working properly because the instances method relied on the pip command having been defined by calling lazy_pip. This lazy_pip pattern is a nice way of getting around Puppet's problem of disqualifying providers at the beginning of a run because the command doesn't yet exist even though part way through the run the command might exist. Really, we need to fix puppet to lazily evaluate a provider command for validity only at the time the provider is needed. The refactoring also pointed out that query could just reuse the logic from instances. The tests were also refactored to use real resources instead of stubbed ones, and they reflect the implementation changes to instances. Paired-with: Richard Crowley <r@rcrowley.org>
2011-03-22(#6527) Added pip package provider.Richard Crowley1-0/+190
Python's pip package manager is analogous to RubyGems and should be included in Puppet. Reviewed-by: Matt Robinson <matt@puppetlabs.com>