+ describe 'apt included, proxy host and port and https' do
+ let :pre_condition do
+ 'class { "apt":
+ proxy => { "host" => "localhost", "port" => 8180, "https" => true },
+ }'
+ end
+ let :facts do
+ {
+ :lsbdistrelease => '14.04',
+ :lsbdistcodename => 'trusty',
+ :operatingsystem => 'Ubuntu',
+ :lsbdistid => 'Ubuntu',
+ :osfamily => 'Debian',
+ :puppetversion => Puppet.version,
+ }
+ end
+ let :params do
+ {
+ :options => '',
+ :package_manage => true,
+ }
+ end
+ let(:title) { 'ppa:foo' }
+ it { is_expected.to contain_package('software-properties-common') }
+ it { is_expected.to contain_exec('add-apt-repository-ppa:foo').that_notifies('Class[Apt::Update]').with({
+ :environment => ['http_proxy=http://localhost:8180', 'https_proxy=https://localhost:8180'],
+ :command => '/usr/bin/add-apt-repository ppa:foo',
+ :unless => '/usr/bin/test -s /etc/apt/sources.list.d/foo-trusty.list',
+ :user => 'root',
+ :logoutput => 'on_failure',