Skip to content

Instantly share code, notes, and snippets.

@drrk
Created September 6, 2016 17:15
Show Gist options
  • Save drrk/b1a0478ba9134541c47b5c5fcbb0bf51 to your computer and use it in GitHub Desktop.
Save drrk/b1a0478ba9134541c47b5c5fcbb0bf51 to your computer and use it in GitHub Desktop.
remote_file error test recipe
The host 192.168.0.9 in the test above does not exist,
and bowerham.net does not respond on port 5678,
but is dropped by the firewall completly,
not even returning a port closed response.
#
# Cookbook Name:: test_remote_file
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
remote_file "#{Chef::Config[:file_cache_path]}/test_file" do
source ['http://thisisaninvalidhost.com/test_file', 'http://192.168.0.9/test_file', 'http://bowerham.net:5678/timeout_file', 'http://bowerham.net/missing_file', 'http://bowerham.net/test_file']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment