File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -160,10 +160,20 @@ module PuppetSpec
160
160
PUPPET_FACTER_2_GCE_URL = %r{^http://metadata/computeMetadata/v1(beta1)?} . freeze
161
161
PUPPET_FACTER_3_GCE_URL = "http://metadata.google.internal/computeMetadata/v1/?recursive=true&alt=json" . freeze
162
162
163
+ # Facter azure metadata endpoint
164
+ PUPPET_FACTER_AZ_URL = "http://169.254.169.254/metadata/instance?api-version=2020-09-01"
165
+
166
+ # Facter EC2 endpoint
167
+ PUPPET_FACTER_EC2_METADATA_URL = 'http://169.254.169.254/latest/meta-data/'
168
+ PUPPET_FACTER_EC2_USERDATA_URL = 'http://169.254.169.254/latest/user-data/'
169
+
163
170
config . around :each do |example |
164
- # Ignore requests from Facter GCE fact in Travis
171
+ # Ignore requests from Facter to external services
165
172
stub_request ( :get , PUPPET_FACTER_2_GCE_URL )
166
173
stub_request ( :get , PUPPET_FACTER_3_GCE_URL )
174
+ stub_request ( :get , PUPPET_FACTER_AZ_URL )
175
+ stub_request ( :get , PUPPET_FACTER_EC2_METADATA_URL )
176
+ stub_request ( :get , PUPPET_FACTER_EC2_USERDATA_URL )
167
177
168
178
# Enable VCR if the example is tagged with `:vcr` metadata.
169
179
if example . metadata [ :vcr ]
You can’t perform that action at this time.
0 commit comments