+ describe 'apt included, proxy host' do
+ let :pre_condition do
+ 'class { "apt":
+ proxy => { "host" => "localhost" },
+ }'
+ end
+
+ let :facts do
+ {
+ os: {
+ family: 'Debian',
+ name: 'Ubuntu',
+ release: {
+ major: '18',
+ full: '18.04',
+ },
+ distro: {
+ codename: 'trusty',
+ id: 'Ubuntu',
+ },
+ },
+ puppet_vardir: '/opt/puppetlabs/puppet/cache',
+ }
+ end
+
+ let :params do
+ {
+ 'package_manage' => true,
+ }
+ end
+
+ let(:title) { 'ppa:user/foo' }
+
+ it { is_expected.to contain_package('software-properties-common') }
+ it {
+ is_expected.to contain_exec('add-apt-repository-ppa:user/foo')
+ .that_notifies('Class[Apt::Update]')
+ .with(*ppa_exec_params('user', 'foo', 'trusty', ['http_proxy=http://localhost:8080']))