From: Sebastien Badia <sbadia@redhat.com>
Date: Sat, 5 Sep 2015 23:37:30 +0000 (+0200)
Subject: spec: Enable webmock connect to IPv4 link-local
X-Git-Tag: 7.0.0~14
X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=60a2c46196d0fdb4675a7482648a85fc928ca0cf;p=puppet-modules%2Fpuppet-ceilometer.git

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: If27fa1adca40bab7fdfcb0687b68d1524c961325
---

diff --git a/spec/classes/ceilometer_collector_spec.rb b/spec/classes/ceilometer_collector_spec.rb
index 6a0ade1..00c83d4 100644
--- a/spec/classes/ceilometer_collector_spec.rb
+++ b/spec/classes/ceilometer_collector_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 'ceilometer::collector' do