Sha256: 4e03ba0492859f94d9295669fa23d16a017850dce0f1910f6f4494338be41fcd

Contents?: true

Size: 1 KB

Versions: 65

Compression:

Stored size: 1 KB

Contents

require 'git_utils'
require 'r10k_utils'
require 'master_manipulator'
test_name 'RK-110 - C88671 - Specify a bad proxy to r10k'

confine(:to, :platform => ['el', 'sles'])

#Init
master_platform = fact_on(master, 'osfamily')
r10k_fqp = get_r10k_fqp(master)

#Verification
proxy_hostname = "http://notarealhostname:3128"
error_regex = /Unable to connect to.*#{proxy_hostname}/i

#Teardown
teardown do
  step 'Remove puppetfile'
  on(master, 'rm -rf modules/')
  on(master, 'rm Puppetfile')
end

step 'turn off the firewall'
on(master, puppet("apply -e 'service {'iptables' : ensure => stopped}'"))

#Tests
step 'make a puppetfile'
create_remote_file(master, "Puppetfile", 'mod "puppetlabs/motd"')

step 'Use a r10k puppetfile'
on(master, "#{r10k_fqp} puppetfile install", {:acceptable_exit_codes => [0,1,2], :environment => {"http_proxy" => proxy_hostname}}) do |result|
  assert(result.exit_code == 1, 'The expected exit code was not observed.')
  assert_match(error_regex, result.stderr, 'Did not see the expected error')
end

Version data entries

65 entries across 65 versions & 2 rubygems

Version Path
r10k-4.0.0 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-4.0.0.pre integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.16.0 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.15.4 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.15.3 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.15.2 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.15.1 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.15.0 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
akerl-r10k-3.14.2.1 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.14.2 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.14.1 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.14.0 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.13.0 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.12.1 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.12.0 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.11.0 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.10.0 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.9.3 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.9.2 integration/tests/basic_functionality/negative/negative_bad_proxy.rb
r10k-3.9.1 integration/tests/basic_functionality/negative/negative_bad_proxy.rb