spec: Enable webmock connect to IPv4 link-local

compile and compile.with_all_deps rpsec matchers make a call
to all facts, and especially the ec2 one (this fact, try to
make a connection on the IPv4 link-local for ec2
metadata which is incompatible with webmock restrictions),
this seems to produce random errors with puppet 3.{3,4}.x
and facter 1.7.6.

Change-Id: I154b37854ffd65a649b9af66610882a82435b90f
Closes-bug: #1492636
This commit is contained in:
Emilien Macchi 2016-01-21 18:52:26 -05:00
parent b2ac15d113
commit e485f3956f
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,9 @@ require 'puppet-openstack_spec_helper/defaults'
require 'rspec-puppet-facts'
include RspecPuppetFacts
# LP1492636 - Cohabitation of compile matcher and webmock
WebMock.disable_net_connect!(:allow => "169.254.169.254")
RSpec.configure do |c|
c.alias_it_should_behave_like_to :it_configures, 'configures'
c.alias_it_should_behave_like_to :it_raises, 'raises'