From 76bfd9e72d44e42bfa608fb2be3097a52a0f62de Mon Sep 17 00:00:00 2001 From: Chris Price Date: Tue, 15 Jan 2013 16:47:52 -0800 Subject: [PATCH] Update Modulefile for 1.1.3 release This updates our dependencies to the latest versions of inifile and postgres. --- Modulefile | 8 +- spec/classes/puppetdb_server_spec.rb | 160 --------------------- spec/classes/puppetdb_storeconfigs_spec.rb | 40 ------ spec/classes/puppetdb_terminus_spec.rb | 45 ------ spec/spec_helper.rb | 1 - 5 files changed, 4 insertions(+), 250 deletions(-) delete mode 100644 spec/classes/puppetdb_server_spec.rb delete mode 100644 spec/classes/puppetdb_storeconfigs_spec.rb delete mode 100644 spec/classes/puppetdb_terminus_spec.rb delete mode 100644 spec/spec_helper.rb diff --git a/Modulefile b/Modulefile index 6e24681..44516c8 100644 --- a/Modulefile +++ b/Modulefile @@ -1,5 +1,5 @@ name 'puppetlabs-puppetdb' -version '1.1.2' +version '1.1.3' source 'git://github.com/puppetlabs-puppet/puppetlabs-puppetdb.git' author 'Puppet Labs' description 'PuppetDB resource types' @@ -7,6 +7,6 @@ summary 'PuppetDB resource types' license 'Apache' project_page 'https://github.com/puppetlabs-puppet/puppetlabs-puppetdb' -dependency 'cprice404/inifile', '0.0.x' -dependency 'puppetlabs/postgresql', '1.0.x' -dependency 'puppetlabs/firewall', '0.0.x' +dependency 'cprice404/inifile', '>= 0.9.0' +dependency 'puppetlabs/postgresql', '2.x' +dependency 'puppetlabs/firewall', '>= 0.0.4' diff --git a/spec/classes/puppetdb_server_spec.rb b/spec/classes/puppetdb_server_spec.rb deleted file mode 100644 index f72ec34..0000000 --- a/spec/classes/puppetdb_server_spec.rb +++ /dev/null @@ -1,160 +0,0 @@ -require 'spec_helper' - -describe 'puppetdb::server', :type => :class do - - context 'using hsqldb' do - let (:params) do - { - :database => 'embedded', - :version => 'present' - } - end - it { - should contain_package('puppetdb').with( - :ensure => params[:version], - :notify => 'Service[puppetdb]' - ) - should contain_file('/etc/puppetdb/conf.d/database.ini').with( - :ensure => 'file', - :require => 'Package[puppetdb]' - ) - should contain_service('puppetdb').with( - :ensure => 'running', - :enable => 'true', - :require => 'File[/etc/puppetdb/conf.d/database.ini]' - ) - should contain_ini_setting('puppetdb_classname').with( - :ensure => 'present', - :section => 'database', - :setting => 'classname', - :value => 'org.hsqldb.jdbcDriver', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - should contain_ini_setting('puppetdb_subprotocol').with( - :ensure => 'present', - :section => 'database', - :setting => 'subprotocol', - :value => 'hsqldb', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - should contain_ini_setting('puppetdb_pgs').with( - :ensure => 'present', - :section => 'database', - :setting => 'syntax_pgs', - :value => 'true', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - should contain_ini_setting('puppetdb_subname').with( - :ensure => 'present', - :section => 'database', - :setting => 'subname', - :value => 'file:/usr/share/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - should contain_ini_setting('puppetdb_gc_interval').with( - :ensure => 'present', - :section => 'database', - :setting => 'gc-interval', - :value => '60', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - } - end - - context 'using postgres' do - let (:params) do - { - :database => 'postgres', - :version => 'present' - } - end - it { - should contain_package('puppetdb').with( - :ensure => params[:version], - :notify => 'Service[puppetdb]' - ) - should contain_file('/etc/puppetdb/conf.d/database.ini').with( - :ensure => 'file', - :require => 'Package[puppetdb]' - ) - should contain_service('puppetdb').with( - :ensure => 'running', - :enable => 'true', - :require => 'File[/etc/puppetdb/conf.d/database.ini]' - ) - should contain_ini_setting('puppetdb_psdatabase_username').with( - :ensure => 'present', - :section => 'database', - :setting => 'username', - :value => 'puppetdb', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - should contain_ini_setting('puppetdb_psdatabase_password').with( - :ensure => 'present', - :section => 'database', - :setting => 'password', - :value => 'puppetdb', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - should contain_ini_setting('puppetdb_classname').with( - :ensure => 'present', - :section => 'database', - :setting => 'classname', - :value => 'org.postgresql.Driver', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - should contain_ini_setting('puppetdb_subprotocol').with( - :ensure => 'present', - :section => 'database', - :setting => 'subprotocol', - :value => 'postgresql', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - should contain_ini_setting('puppetdb_pgs').with( - :ensure => 'present', - :section => 'database', - :setting => 'syntax_pgs', - :value => 'true', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - should contain_ini_setting('puppetdb_subname').with( - :ensure => 'present', - :section => 'database', - :setting => 'subname', - :value => '//localhost:5432/puppetdb', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - should contain_ini_setting('puppetdb_gc_interval').with( - :ensure => 'present', - :section => 'database', - :setting => 'gc-interval', - :value => '60', - :require => 'File[/etc/puppetdb/conf.d/database.ini]', - :notify => 'Service[puppetdb]', - :path => '/etc/puppetdb/conf.d/database.ini' - ) - } - end -end \ No newline at end of file diff --git a/spec/classes/puppetdb_storeconfigs_spec.rb b/spec/classes/puppetdb_storeconfigs_spec.rb deleted file mode 100644 index da99840..0000000 --- a/spec/classes/puppetdb_storeconfigs_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'spec_helper' - -describe 'puppetdb::storeconfigs', :type => :class do - - context 'on Debian' do - let (:params) do - { - :dbserver => 'test.example.com', - :dbport => '8081', - :puppet_confdir => '/etc/puppet/', - :puppet_conf => '/etc/puppet/puppet.conf', - } - end - - it { - should contain_class('puppetdb::terminus') - should contain_ini_setting('puppetmasterstoreconfig').with( - :ensure => 'present', - :section => 'master', - :setting => 'storeconfigs', - :path => params[:puppet_conf], - :value =>'true' - ) - should contain_ini_setting('puppetmasterstorebackend').with( - :ensure => 'present', - :section => 'master', - :setting => 'storeconfigs_backend', - :path => params[:puppet_conf], - :value =>'puppetdb' - ) - should contain_ini_setting('puppetmasterstoreconfigserver').with( - :ensure => 'present', - :section => 'master', - :setting => 'server', - :path => params[:puppet_conf], - :value => params[:dbserver] - ) - } - end -end diff --git a/spec/classes/puppetdb_terminus_spec.rb b/spec/classes/puppetdb_terminus_spec.rb deleted file mode 100644 index 0545118..0000000 --- a/spec/classes/puppetdb_terminus_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'spec_helper' - -describe 'puppetdb::terminus', :type => :class do - - context 'on Debian' do - let (:params) do - { - :dbserver => 'test.example.com', - :dbport => '8081', - :puppet_confdir => '/etc/puppet/', - } - end - - it { - should contain_package('puppetdb-terminus').with( - :ensure => 'present' - ) - should contain_file("#{params[:puppet_confdir]}/routes.yaml").with( - :ensure => 'file', - :source => 'puppet:///modules/puppet/routes.yaml', - :notify => params[:puppet_service], - :require => 'Package[puppetdb-terminus]' - ) - should contain_file("#{params[:puppet_confdir]}/puppetdb.conf").with( - :ensure => 'file', - :notify => params[:puppet_service], - :require => "File[#{params[:puppet_confdir]}/routes.yaml]" - ) - should contain_ini_setting('puppetterminusserver').with( - :ensure => 'present', - :section => 'main', - :setting => 'server', - :path => "#{params[:puppet_confdir]}/puppetdb.conf", - :value => params[:dbserver] - ) - should contain_ini_setting('puppetterminusport').with( - :ensure => 'present', - :section => 'main', - :setting => 'port', - :path => "#{params[:puppet_confdir]}/puppetdb.conf", - :value => params[:dbport] - ) - } - end -end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb deleted file mode 100644 index 2c6f566..0000000 --- a/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper'