3 describe 'opendaylight::repos' do
4 shared_examples_for "opendaylight::repos on Debian" do
5 context "with defaults" do
6 it { should contain_class('opendaylight::repos') }
7 it { should contain_class('apt') }
8 it { should contain_apt__ppa('ppa:odl-team/nitrogen') }
11 context "with custom deb_repo" do
13 { :deb_repo => 'ppa:foo/testing' }
16 it { should contain_apt__ppa('ppa:foo/testing') }
19 shared_examples_for "opendaylight::repos on RedHat" do
20 context "with defaults" do
21 it { should contain_class('opendaylight::repos') }
23 should contain_yumrepo('opendaylight').with(
24 :baseurl => 'https://nexus.opendaylight.org/content/repositories/opendaylight-fluorine-epel-7-$basearch-devel',
31 context "with custom rpm repo options" do
34 :rpm_repo => 'foo_fake_repo',
35 :rpm_repo_enabled => 0,
36 :rpm_repo_gpgcheck => 1,
40 should contain_yumrepo('opendaylight').with(
41 :baseurl => 'foo_fake_repo',
50 describe "on unsupported os" do
51 context "when on Solaris" do
53 {:osfamily => 'Solaris', :operatingsystem => 'Solaris'}
58 expect { is_expected.to raise_error(Puppet::Error) }
63 on_supported_os.each do |os, facts|
69 it_behaves_like "opendaylight::repos on #{facts[:osfamily]}"