Issue #7468 has been reported by Matt Robinson.

----------------------------------------
Bug #7468: Spec test tries to connect to pypi.python.org
https://projects.puppetlabs.com/issues/7468

Author: Matt Robinson
Status: Accepted
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


The tests are actually executing the network call here:

    lib/puppet/provider/package/pip.rb51:    
    client = XMLRPC::Client.new2("http://pypi.python.org/pypi";)

This results in a couple test failures if you don't have a network connection.

    ─ [1]% rspec spec/unit/provider/package/pip_spec.rb.
    ......FF..........

    Failures:

      1) Puppet::Type::Package::ProviderPip latest should find a version number 
for Django
         Failure/Error: @provider.latest.should_not == nil
         SocketError:
           getaddrinfo: nodename nor servname provided, or not known
         # ./lib/puppet/provider/package/pip.rb:53:in `latest'
         # ./spec/unit/provider/package/pip_spec.rb:77

      2) Puppet::Type::Package::ProviderPip latest should not find a version 
number for sdsfdssdhdfyjymdgfcjdfjxdrssf
         Failure/Error: @provider.latest.should == nil
         SocketError:
           getaddrinfo: nodename nor servname provided, or not known
         # ./lib/puppet/provider/package/pip.rb:53:in `latest'
         # ./spec/unit/provider/package/pip_spec.rb:82

The spec and unit tests should never need to call out to the internet, we 
should stub that portion.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to