From c306830644bd17cc11491b7135c8d027e2ff82c0 Mon Sep 17 00:00:00 2001 From: Sebastien Badia Date: Sun, 6 Sep 2015 01:35:45 +0200 Subject: [PATCH] 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. Closes-bug: #1492636 Change-Id: Ia47236e1c929e8d449bbb43cd2162f3d79d654f7 --- spec/classes/swift_ringserver_spec.rb | 2 ++ spec/spec_helper.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/spec/classes/swift_ringserver_spec.rb b/spec/classes/swift_ringserver_spec.rb index e0148d4a..a896ef0d 100644 --- a/spec/classes/swift_ringserver_spec.rb +++ b/spec/classes/swift_ringserver_spec.rb @@ -1,4 +1,6 @@ require 'spec_helper' +# LP1492636 - Cohabitation of compile matcher and webmock +WebMock.disable_net_connect!(:allow => "169.254.169.254") describe 'swift::ringserver' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 45654e7e..7907e4c1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,6 @@ require 'puppetlabs_spec_helper/module_spec_helper' require 'shared_examples' +require 'webmock/rspec' RSpec.configure do |c| c.alias_it_should_behave_like_to :it_configures, 'configures'