Debian Codegraph @

spec/classes/ceph_profile_base_spec.rb

raw
1 #
2 # Copyright (C) 2014 Nine Internet Solutions AG
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 # Author: David Gurtner <[email protected]>
17 #
18 require 'spec_helper'
19
20 describe 'ceph::profile::base' do
21
22 shared_examples 'ceph profile base' do
23 describe "with default params" do
24 it { should contain_class('ceph::profile::params') }
25 it { should contain_class('ceph::repo') }
26 it { should contain_class('ceph') }
27 end
28
29 describe "with custom param manage_repo false" do
30 let :pre_condition do
31 "class { 'ceph::profile::params': manage_repo => false }"
32 end
33 it { should contain_class('ceph::profile::params') }
34 it { should_not contain_class('ceph::repo') }
35 it { should contain_class('ceph') }
36 end
37 end
38
39
40 on_supported_os.each do |os, facts|
41 context "on #{os}" do
42 let(:facts) do
43 facts.merge({})
44 end
45
46 it_behaves_like 'ceph profile base'
47 end
48 end
49 end