diff --git a/.kitchen.yml b/.kitchen.yml index 0f8bb87..7f90c70 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -20,6 +20,8 @@ suites: freeswitch: local_ip: '0.0.0.0' domain: 'foo.bar.com' + package: + version: '1.2.22~2-1~wheezy+1' - name: source run_list: - recipe[freeswitch] diff --git a/attributes/package.rb b/attributes/package.rb index 83f1840..1007d00 100644 --- a/attributes/package.rb +++ b/attributes/package.rb @@ -16,6 +16,7 @@ freeswitch-config-vanilla ) end +default['freeswitch']['package']['version'] = nil default['freeswitch']['package']['config_template'] = 'vanilla' default['freeswitch']['package']['repo']['enable'] = true diff --git a/recipes/package.rb b/recipes/package.rb index 971c745..dc0807d 100644 --- a/recipes/package.rb +++ b/recipes/package.rb @@ -12,7 +12,9 @@ end node['freeswitch']['package']['packages'].each do |pkg| - package pkg + package pkg do + version node['freeswitch']['package']['version'] + end end directory "/etc/freeswitch" do diff --git a/test/integration/package/serverspec/localhost/freeswitch_spec.rb b/test/integration/package/serverspec/localhost/freeswitch_spec.rb index f9dc536..f4fc65f 100644 --- a/test/integration/package/serverspec/localhost/freeswitch_spec.rb +++ b/test/integration/package/serverspec/localhost/freeswitch_spec.rb @@ -24,7 +24,7 @@ end describe command('fs_cli -x "version"') do - it { should return_stdout /FreeSWITCH Version 1.2/ } + it { should return_stdout /FreeSWITCH Version 1.2.22/ } end describe port(5060) do