freighthop 0.0.6 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Puppetfile +1 -0
- data/Puppetfile.lock +3 -0
- data/Vagrantfile +1 -1
- data/bin/fh +2 -78
- data/lib/freighthop/cli/help.rb +69 -0
- data/lib/freighthop/cli/ssh.rb +46 -0
- data/lib/freighthop/cli/vagrant.rb +26 -0
- data/lib/freighthop/cli.rb +40 -0
- data/lib/freighthop/config.rb +4 -0
- data/lib/freighthop/vagrant_env.rb +24 -0
- data/lib/freighthop/version.rb +1 -1
- data/lib/freighthop.rb +7 -4
- data/local_modules/freighthop/manifests/database/mysql.pp +20 -0
- data/local_modules/freighthop/manifests/database/postgres.pp +6 -6
- data/local_modules/freighthop/manifests/database.pp +6 -8
- data/local_modules/freighthop/manifests/init.pp +1 -8
- data/local_modules/freighthop/manifests/params.pp +0 -3
- data/modules/apt/CHANGELOG +12 -2
- data/modules/apt/Gemfile +6 -5
- data/modules/apt/Gemfile.lock +40 -5
- data/modules/apt/Modulefile +1 -1
- data/modules/apt/README.md +2 -1
- data/modules/apt/Rakefile +1 -0
- data/modules/apt/manifests/init.pp +4 -1
- data/modules/apt/manifests/ppa.pp +1 -1
- data/modules/apt/manifests/update.pp +1 -0
- data/modules/apt/metadata.json +21 -13
- data/modules/apt/spec/defines/ppa_spec.rb +3 -3
- data/modules/apt/spec/defines/source_spec.rb +2 -2
- data/modules/apt/spec/spec_helper_system.rb +30 -0
- data/modules/apt/spec/system/apt_builddep_spec.rb +38 -0
- data/modules/apt/spec/system/apt_key_spec.rb +53 -0
- data/modules/apt/spec/system/apt_ppa_spec.rb +59 -0
- data/modules/apt/spec/system/apt_source_spec.rb +51 -0
- data/modules/apt/spec/system/basic_spec.rb +10 -0
- data/modules/apt/spec/system/class_spec.rb +20 -0
- data/modules/apt/templates/source.list.erb +2 -2
- data/modules/freighthop/manifests/database/mysql.pp +20 -0
- data/modules/freighthop/manifests/database/postgres.pp +6 -6
- data/modules/freighthop/manifests/database.pp +6 -8
- data/modules/freighthop/manifests/init.pp +1 -8
- data/modules/freighthop/manifests/params.pp +0 -3
- data/modules/mysql/CHANGELOG +403 -0
- data/modules/mysql/Gemfile +24 -0
- data/modules/mysql/Gemfile.lock +129 -0
- data/modules/mysql/LICENSE +201 -0
- data/modules/mysql/Modulefile +9 -0
- data/modules/mysql/README.md +492 -0
- data/modules/mysql/Rakefile +2 -0
- data/modules/mysql/TODO +8 -0
- data/modules/mysql/files/mysqltuner.pl +966 -0
- data/modules/mysql/lib/puppet/parser/functions/mysql_deepmerge.rb +52 -0
- data/modules/mysql/lib/puppet/parser/functions/mysql_password.rb +15 -0
- data/modules/mysql/lib/puppet/parser/functions/mysql_strip_hash.rb +21 -0
- data/modules/mysql/lib/puppet/provider/database/mysql.rb +52 -0
- data/modules/mysql/lib/puppet/provider/database_grant/mysql.rb +210 -0
- data/modules/mysql/lib/puppet/provider/database_user/mysql.rb +76 -0
- data/modules/mysql/lib/puppet/provider/mysql.rb +67 -0
- data/modules/mysql/lib/puppet/provider/mysql_database/mysql.rb +68 -0
- data/modules/mysql/lib/puppet/provider/mysql_grant/mysql.rb +115 -0
- data/modules/mysql/lib/puppet/provider/mysql_user/mysql.rb +115 -0
- data/modules/mysql/lib/puppet/type/database.rb +21 -0
- data/modules/mysql/lib/puppet/type/database_grant.rb +79 -0
- data/modules/mysql/lib/puppet/type/database_user.rb +31 -0
- data/modules/mysql/lib/puppet/type/mysql_database.rb +22 -0
- data/modules/mysql/lib/puppet/type/mysql_grant.rb +72 -0
- data/modules/mysql/lib/puppet/type/mysql_user.rb +45 -0
- data/modules/mysql/manifests/backup.pp +31 -0
- data/modules/mysql/manifests/bindings/java.pp +10 -0
- data/modules/mysql/manifests/bindings/perl.pp +10 -0
- data/modules/mysql/manifests/bindings/php.pp +10 -0
- data/modules/mysql/manifests/bindings/python.pp +10 -0
- data/modules/mysql/manifests/bindings/ruby.pp +10 -0
- data/modules/mysql/manifests/bindings.pp +33 -0
- data/modules/mysql/manifests/client/install.pp +8 -0
- data/modules/mysql/manifests/client.pp +27 -0
- data/modules/mysql/manifests/db.pp +59 -0
- data/modules/mysql/manifests/init.pp +100 -0
- data/modules/mysql/manifests/params.pp +230 -0
- data/modules/mysql/manifests/server/account_security.pp +22 -0
- data/modules/mysql/manifests/server/backup.pp +56 -0
- data/modules/mysql/manifests/server/config.pp +31 -0
- data/modules/mysql/manifests/server/install.pp +9 -0
- data/modules/mysql/manifests/server/monitor.pp +24 -0
- data/modules/mysql/manifests/server/mysqltuner.pp +9 -0
- data/modules/mysql/manifests/server/providers.pp +8 -0
- data/modules/mysql/manifests/server/root_password.pp +21 -0
- data/modules/mysql/manifests/server/service.pp +19 -0
- data/modules/mysql/manifests/server.pp +69 -0
- data/modules/mysql/metadata.json +289 -0
- data/modules/mysql/spec/classes/mysql_bindings_spec.rb +58 -0
- data/modules/mysql/spec/classes/mysql_client_spec.rb +16 -0
- data/modules/mysql/spec/classes/mysql_server_account_security_spec.rb +41 -0
- data/modules/mysql/spec/classes/mysql_server_backup_spec.rb +112 -0
- data/modules/mysql/spec/classes/mysql_server_monitor_spec.rb +31 -0
- data/modules/mysql/spec/classes/mysql_server_mysqltuner_spec.rb +5 -0
- data/modules/mysql/spec/classes/mysql_server_spec.rb +162 -0
- data/modules/mysql/spec/defines/mysql_db_spec.rb +51 -0
- data/modules/mysql/spec/spec.opts +6 -0
- data/modules/mysql/spec/spec_helper.rb +5 -0
- data/modules/mysql/spec/spec_helper_system.rb +28 -0
- data/modules/mysql/spec/system/mysql_account_delete_spec.rb +35 -0
- data/modules/mysql/spec/system/mysql_backup_spec.rb +77 -0
- data/modules/mysql/spec/system/mysql_bindings_spec.rb +90 -0
- data/modules/mysql/spec/system/mysql_db_spec.rb +61 -0
- data/modules/mysql/spec/system/mysql_server_monitor_spec.rb +30 -0
- data/modules/mysql/spec/system/mysql_server_root_password_spec.rb +71 -0
- data/modules/mysql/spec/system/mysql_server_spec.rb +85 -0
- data/modules/mysql/spec/system/types/mysql_grant_spec.rb +314 -0
- data/modules/mysql/spec/system/types/mysql_user_spec.rb +35 -0
- data/modules/mysql/spec/unit/mysql_password_spec.rb +27 -0
- data/modules/mysql/spec/unit/puppet/functions/mysql_deepmerge_spec.rb +77 -0
- data/modules/mysql/spec/unit/puppet/provider/database/mysql_spec.rb +86 -0
- data/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb +95 -0
- data/modules/mysql/spec/unit/puppet/provider/database_user/mysql_spec.rb +119 -0
- data/modules/mysql/spec/unit/puppet/provider/mysql_database/mysql_spec.rb +118 -0
- data/modules/mysql/spec/unit/puppet/provider/mysql_user/mysql_spec.rb +130 -0
- data/modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb +29 -0
- data/modules/mysql/spec/unit/puppet/type/mysql_user_spec.rb +30 -0
- data/modules/mysql/templates/my.cnf.erb +17 -0
- data/modules/mysql/templates/my.cnf.pass.erb +7 -0
- data/modules/mysql/templates/my.conf.cnf.erb +17 -0
- data/modules/mysql/templates/mysqlbackup.sh.erb +57 -0
- data/modules/mysql/tests/backup.pp +8 -0
- data/modules/mysql/tests/bindings.pp +3 -0
- data/modules/mysql/tests/init.pp +1 -0
- data/modules/mysql/tests/java.pp +1 -0
- data/modules/mysql/tests/mysql_database.pp +12 -0
- data/modules/mysql/tests/mysql_grant.pp +5 -0
- data/modules/mysql/tests/mysql_user.pp +23 -0
- data/modules/mysql/tests/perl.pp +1 -0
- data/modules/mysql/tests/python.pp +1 -0
- data/modules/mysql/tests/ruby.pp +1 -0
- data/modules/mysql/tests/server/account_security.pp +4 -0
- data/modules/mysql/tests/server/config.pp +11 -0
- data/modules/mysql/tests/server.pp +3 -0
- data/modules/postgresql/Changelog +191 -0
- data/modules/postgresql/Gemfile +1 -0
- data/modules/postgresql/Gemfile.lock +9 -0
- data/modules/postgresql/LICENSE +198 -12
- data/modules/postgresql/Modulefile +2 -2
- data/modules/postgresql/NOTICE +14 -0
- data/modules/postgresql/README.md +435 -184
- data/modules/postgresql/files/validate_postgresql_connection.sh +31 -0
- data/modules/postgresql/lib/puppet/provider/postgresql_conf/parsed.rb +37 -0
- data/modules/postgresql/lib/puppet/provider/postgresql_psql/ruby.rb +4 -0
- data/modules/postgresql/lib/puppet/type/postgresql_conf.rb +31 -0
- data/modules/postgresql/lib/puppet/type/postgresql_psql.rb +4 -0
- data/modules/postgresql/manifests/client.pp +17 -16
- data/modules/postgresql/manifests/globals.pp +95 -0
- data/modules/postgresql/manifests/lib/devel.pp +15 -0
- data/modules/postgresql/manifests/lib/java.pp +15 -0
- data/modules/postgresql/manifests/lib/python.pp +13 -0
- data/modules/postgresql/manifests/params.pp +127 -222
- data/modules/postgresql/manifests/repo/apt_postgresql_org.pp +30 -0
- data/modules/postgresql/manifests/repo/yum_postgresql_org.pp +38 -0
- data/modules/postgresql/manifests/repo.pp +22 -0
- data/modules/postgresql/manifests/server/config.pp +113 -0
- data/modules/postgresql/manifests/server/config_entry.pp +43 -0
- data/modules/postgresql/manifests/server/contrib.pp +27 -0
- data/modules/postgresql/manifests/server/database.pp +75 -0
- data/modules/postgresql/manifests/server/database_grant.pp +18 -0
- data/modules/postgresql/manifests/server/db.pp +36 -0
- data/modules/postgresql/manifests/server/firewall.pp +21 -0
- data/modules/postgresql/manifests/server/grant.pp +81 -0
- data/modules/postgresql/manifests/server/initdb.pp +52 -0
- data/modules/postgresql/manifests/server/install.pp +49 -0
- data/modules/postgresql/manifests/server/passwd.pp +34 -0
- data/modules/postgresql/manifests/server/pg_hba_rule.pp +54 -0
- data/modules/postgresql/manifests/server/plperl.pp +27 -0
- data/modules/postgresql/manifests/server/reload.pp +15 -0
- data/modules/postgresql/manifests/{role.pp → server/role.pp} +19 -33
- data/modules/postgresql/manifests/server/service.pp +40 -0
- data/modules/postgresql/manifests/{table_grant.pp → server/table_grant.pp} +4 -4
- data/modules/postgresql/manifests/server/tablespace.pp +42 -0
- data/modules/postgresql/manifests/server.pp +61 -83
- data/modules/postgresql/manifests/validate_db_connection.pp +49 -50
- data/modules/postgresql/metadata.json +123 -73
- data/modules/postgresql/spec/spec_helper_system.rb +13 -1
- data/modules/postgresql/spec/system/client_spec.rb +22 -0
- data/modules/postgresql/spec/system/common_patterns_spec.rb +53 -0
- data/modules/postgresql/spec/system/contrib_spec.rb +33 -0
- data/modules/postgresql/spec/system/lib/devel_spec.rb +22 -0
- data/modules/postgresql/spec/system/lib/java_spec.rb +25 -0
- data/modules/postgresql/spec/system/lib/python_spec.rb +24 -0
- data/modules/postgresql/spec/system/postgresql_psql_spec.rb +51 -0
- data/modules/postgresql/spec/system/server/config_entry_spec.rb +32 -0
- data/modules/postgresql/spec/system/server/database_grant_spec.rb +54 -0
- data/modules/postgresql/spec/system/server/database_spec.rb +35 -0
- data/modules/postgresql/spec/system/server/db_spec.rb +143 -0
- data/modules/postgresql/spec/system/server/grant_spec.rb +55 -0
- data/modules/postgresql/spec/system/server/pg_hba_rule_spec.rb +85 -0
- data/modules/postgresql/spec/system/server/plperl_spec.rb +29 -0
- data/modules/postgresql/spec/system/server/role_spec.rb +103 -0
- data/modules/postgresql/spec/system/server/table_grant_spec.rb +72 -0
- data/modules/postgresql/spec/system/server/tablespace_spec.rb +74 -0
- data/modules/postgresql/spec/system/server_spec.rb +217 -0
- data/modules/postgresql/spec/system/validate_db_connection_spec.rb +91 -0
- data/modules/postgresql/spec/unit/classes/client_spec.rb +27 -2
- data/modules/postgresql/spec/unit/classes/globals_spec.rb +28 -0
- data/modules/postgresql/spec/unit/classes/lib/devel_spec.rb +12 -0
- data/modules/postgresql/spec/unit/classes/{postgresql_java_spec.rb → lib/java_spec.rb} +9 -19
- data/modules/postgresql/spec/unit/classes/lib/python_spec.rb +31 -0
- data/modules/postgresql/spec/unit/classes/params_spec.rb +2 -1
- data/modules/postgresql/spec/unit/classes/repo_spec.rb +17 -0
- data/modules/postgresql/spec/unit/classes/server/contrib_spec.rb +42 -0
- data/modules/postgresql/spec/unit/classes/server/initdb_spec.rb +28 -0
- data/modules/postgresql/spec/unit/classes/server/plperl_spec.rb +45 -0
- data/modules/postgresql/spec/unit/classes/server_spec.rb +83 -2
- data/modules/postgresql/spec/unit/defines/server/config_entry_spec.rb +23 -0
- data/modules/postgresql/spec/unit/defines/server/database_grant_spec.rb +26 -0
- data/modules/postgresql/spec/unit/defines/server/database_spec.rb +16 -0
- data/modules/postgresql/spec/unit/defines/server/db_spec.rb +28 -0
- data/modules/postgresql/spec/unit/defines/{database_grant_spec.rb → server/grant_spec.rb} +7 -4
- data/modules/postgresql/spec/unit/defines/{pg_hba_rule_spec.rb → server/pg_hba_rule_spec.rb} +59 -2
- data/modules/postgresql/spec/unit/defines/server/role_spec.rb +23 -0
- data/modules/postgresql/spec/unit/defines/server/table_grant_spec.rb +27 -0
- data/modules/postgresql/spec/unit/defines/server/tablespace_spec.rb +23 -0
- data/modules/postgresql/spec/unit/defines/validate_db_connection_spec.rb +22 -9
- data/modules/postgresql/spec/unit/provider/postgresql_conf/parsed_spec.rb +112 -0
- data/modules/postgresql/spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb +29 -0
- data/modules/postgresql/spec/unit/puppet/type/postgresql_psql_spec.rb +1 -0
- data/modules/postgresql/spec/unit/type/postgresql_conf_spec.rb +50 -0
- metadata +177 -53
- data/modules/postgresql/examples/init.pp +0 -1
- data/modules/postgresql/examples/official-postgresql-repos.pp +0 -19
- data/modules/postgresql/examples/postgresql_database.pp +0 -22
- data/modules/postgresql/examples/postgresql_db.pp +0 -30
- data/modules/postgresql/examples/postgresql_grant.pp +0 -14
- data/modules/postgresql/examples/postgresql_pg_hba_rule.pp +0 -18
- data/modules/postgresql/examples/postgresql_pgconf_extras.pp +0 -19
- data/modules/postgresql/examples/postgresql_tablespace.pp +0 -73
- data/modules/postgresql/examples/postgresql_user.pp +0 -28
- data/modules/postgresql/examples/server.pp +0 -10
- data/modules/postgresql/lib/facter/postgres_default_version.rb +0 -69
- data/modules/postgresql/manifests/config/afterservice.pp +0 -47
- data/modules/postgresql/manifests/config/beforeservice.pp +0 -171
- data/modules/postgresql/manifests/config.pp +0 -74
- data/modules/postgresql/manifests/contrib.pp +0 -29
- data/modules/postgresql/manifests/database.pp +0 -85
- data/modules/postgresql/manifests/database_grant.pp +0 -35
- data/modules/postgresql/manifests/database_user.pp +0 -60
- data/modules/postgresql/manifests/db.pp +0 -77
- data/modules/postgresql/manifests/devel.pp +0 -27
- data/modules/postgresql/manifests/grant.pp +0 -77
- data/modules/postgresql/manifests/init.pp +0 -145
- data/modules/postgresql/manifests/initdb.pp +0 -52
- data/modules/postgresql/manifests/java.pp +0 -29
- data/modules/postgresql/manifests/package_source/apt_postgresql_org.pp +0 -21
- data/modules/postgresql/manifests/package_source/yum_postgresql_org.pp +0 -30
- data/modules/postgresql/manifests/pg_hba.pp +0 -19
- data/modules/postgresql/manifests/pg_hba_rule.pp +0 -41
- data/modules/postgresql/manifests/plperl.pp +0 -24
- data/modules/postgresql/manifests/psql.pp +0 -56
- data/modules/postgresql/manifests/python.pp +0 -18
- data/modules/postgresql/manifests/tablespace.pp +0 -59
- data/modules/postgresql/spec/system/install_spec.rb +0 -707
- data/modules/postgresql/spec/system/non_defaults_spec.rb +0 -114
- data/modules/postgresql/spec/unit/classes/contrib_spec.rb +0 -11
- data/modules/postgresql/spec/unit/classes/devel_spec.rb +0 -11
- data/modules/postgresql/spec/unit/classes/init_spec.rb +0 -71
- data/modules/postgresql/spec/unit/classes/postgresql_python_spec.rb +0 -53
- data/modules/postgresql/spec/unit/defines/database_spec.rb +0 -14
- data/modules/postgresql/spec/unit/defines/database_user_spec.rb +0 -19
- data/modules/postgresql/spec/unit/defines/db_spec.rb +0 -20
- data/modules/postgresql/spec/unit/defines/pg_hba_spec.rb +0 -20
- data/modules/postgresql/spec/unit/defines/psql_spec.rb +0 -20
- data/modules/postgresql/spec/unit/defines/role_spec.rb +0 -14
- data/modules/postgresql/spec/unit/defines/tablespace_spec.rb +0 -19
- data/modules/postgresql/spec/unit/facts/postgres_default_version_spec.rb +0 -14
@@ -0,0 +1,103 @@
|
|
1
|
+
require 'spec_helper_system'
|
2
|
+
|
3
|
+
describe 'postgresql::server::role:' do
|
4
|
+
after :all do
|
5
|
+
# Cleanup after tests have ran
|
6
|
+
puppet_apply("class { 'postgresql::server': ensure => absent }") do |r|
|
7
|
+
r.exit_code.should_not == 1
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should idempotently create a user who can log in' do
|
12
|
+
pp = <<-EOS.unindent
|
13
|
+
$user = "postgresql_test_user"
|
14
|
+
$password = "postgresql_test_password"
|
15
|
+
|
16
|
+
class { 'postgresql::server': }
|
17
|
+
|
18
|
+
# Since we are not testing pg_hba or any of that, make a local user for ident auth
|
19
|
+
user { $user:
|
20
|
+
ensure => present,
|
21
|
+
}
|
22
|
+
|
23
|
+
postgresql::server::role { $user:
|
24
|
+
password_hash => postgresql_password($user, $password),
|
25
|
+
}
|
26
|
+
EOS
|
27
|
+
|
28
|
+
puppet_apply(pp) do |r|
|
29
|
+
r.exit_code.should_not == 1
|
30
|
+
r.refresh
|
31
|
+
r.exit_code.should == 0
|
32
|
+
end
|
33
|
+
|
34
|
+
# Check that the user can log in
|
35
|
+
psql('--command="select datname from pg_database" postgres', 'postgresql_test_user') do |r|
|
36
|
+
r.stdout.should =~ /template1/
|
37
|
+
r.stderr.should == ''
|
38
|
+
r.exit_code.should == 0
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'should idempotently alter a user who can log in' do
|
43
|
+
pp = <<-EOS.unindent
|
44
|
+
$user = "postgresql_test_user"
|
45
|
+
$password = "postgresql_test_password2"
|
46
|
+
|
47
|
+
class { 'postgresql::server': }
|
48
|
+
|
49
|
+
# Since we are not testing pg_hba or any of that, make a local user for ident auth
|
50
|
+
user { $user:
|
51
|
+
ensure => present,
|
52
|
+
}
|
53
|
+
|
54
|
+
postgresql::server::role { $user:
|
55
|
+
password_hash => postgresql_password($user, $password),
|
56
|
+
}
|
57
|
+
EOS
|
58
|
+
|
59
|
+
puppet_apply(pp) do |r|
|
60
|
+
r.exit_code.should_not == 1
|
61
|
+
r.refresh
|
62
|
+
r.exit_code.should == 0
|
63
|
+
end
|
64
|
+
|
65
|
+
# Check that the user can log in
|
66
|
+
psql('--command="select datname from pg_database" postgres', 'postgresql_test_user') do |r|
|
67
|
+
r.stdout.should =~ /template1/
|
68
|
+
r.stderr.should == ''
|
69
|
+
r.exit_code.should == 0
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'should idempotently create a user with a cleartext password' do
|
74
|
+
pp = <<-EOS.unindent
|
75
|
+
$user = "postgresql_test_user2"
|
76
|
+
$password = "postgresql_test_password2"
|
77
|
+
|
78
|
+
class { 'postgresql::server': }
|
79
|
+
|
80
|
+
# Since we are not testing pg_hba or any of that, make a local user for ident auth
|
81
|
+
user { $user:
|
82
|
+
ensure => present,
|
83
|
+
}
|
84
|
+
|
85
|
+
postgresql::server::role { $user:
|
86
|
+
password_hash => $password,
|
87
|
+
}
|
88
|
+
EOS
|
89
|
+
|
90
|
+
puppet_apply(pp) do |r|
|
91
|
+
r.exit_code.should_not == 1
|
92
|
+
r.refresh
|
93
|
+
r.exit_code.should == 0
|
94
|
+
end
|
95
|
+
|
96
|
+
# Check that the user can log in
|
97
|
+
psql('--command="select datname from pg_database" postgres', 'postgresql_test_user2') do |r|
|
98
|
+
r.stdout.should =~ /template1/
|
99
|
+
r.stderr.should == ''
|
100
|
+
r.exit_code.should == 0
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
require 'spec_helper_system'
|
2
|
+
|
3
|
+
describe 'postgresql::server::table_grant:' do
|
4
|
+
after :all do
|
5
|
+
# Cleanup after tests have ran
|
6
|
+
puppet_apply("class { 'postgresql::server': ensure => absent }") do |r|
|
7
|
+
r.exit_code.should_not == 1
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should grant access so a user can insert in a table' do
|
12
|
+
begin
|
13
|
+
pp = <<-EOS.unindent
|
14
|
+
$db = 'table_grant'
|
15
|
+
$user = 'psql_grant_tester'
|
16
|
+
$password = 'psql_table_pw'
|
17
|
+
|
18
|
+
class { 'postgresql::server': }
|
19
|
+
|
20
|
+
# Since we are not testing pg_hba or any of that, make a local user for ident auth
|
21
|
+
user { $user:
|
22
|
+
ensure => present,
|
23
|
+
}
|
24
|
+
|
25
|
+
postgresql::server::role { $user:
|
26
|
+
password_hash => postgresql_password($user, $password),
|
27
|
+
}
|
28
|
+
|
29
|
+
postgresql::server::database { $db: }
|
30
|
+
|
31
|
+
# Create a rule for the user
|
32
|
+
postgresql::server::pg_hba_rule { "allow ${user}":
|
33
|
+
type => 'local',
|
34
|
+
database => $db,
|
35
|
+
user => $user,
|
36
|
+
auth_method => 'ident',
|
37
|
+
order => 1,
|
38
|
+
}
|
39
|
+
|
40
|
+
postgresql_psql { 'Create testing table':
|
41
|
+
command => 'CREATE TABLE "test_table" (field integer NOT NULL)',
|
42
|
+
db => $db,
|
43
|
+
unless => "SELECT * FROM pg_tables WHERE tablename = 'test_table'",
|
44
|
+
require => Postgresql::Server::Database[$db],
|
45
|
+
}
|
46
|
+
|
47
|
+
postgresql::server::table_grant { 'grant insert test':
|
48
|
+
privilege => 'INSERT',
|
49
|
+
table => 'test_table',
|
50
|
+
db => $db,
|
51
|
+
role => $user,
|
52
|
+
require => Postgresql_psql['Create testing table'],
|
53
|
+
}
|
54
|
+
EOS
|
55
|
+
|
56
|
+
puppet_apply(pp) do |r|
|
57
|
+
r.exit_code.should_not == 1
|
58
|
+
r.refresh
|
59
|
+
r.exit_code.should == 0
|
60
|
+
end
|
61
|
+
|
62
|
+
## Check that the user can create a table in the database
|
63
|
+
psql('--command="create table foo (foo int)" postgres', 'psql_grant_tester') do |r|
|
64
|
+
r.stdout.should =~ /CREATE TABLE/
|
65
|
+
r.stderr.should be_empty
|
66
|
+
r.exit_code.should == 0
|
67
|
+
end
|
68
|
+
ensure
|
69
|
+
psql('--command="drop table foo" postgres', 'psql_grant_tester')
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
require 'spec_helper_system'
|
2
|
+
|
3
|
+
describe 'postgresql::server::tablespace:' do
|
4
|
+
after :all do
|
5
|
+
# Cleanup after tests have ran
|
6
|
+
puppet_apply("class { 'postgresql::server': ensure => absent }") do |r|
|
7
|
+
r.exit_code.should_not == 1
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should idempotently create tablespaces and databases that are using them' do
|
12
|
+
pp = <<-EOS.unindent
|
13
|
+
class { 'postgresql::server': }
|
14
|
+
|
15
|
+
file { '/tmp/pg_tablespaces':
|
16
|
+
ensure => 'directory',
|
17
|
+
owner => 'postgres',
|
18
|
+
group => 'postgres',
|
19
|
+
mode => '0700',
|
20
|
+
}~>
|
21
|
+
# This works around rubies that lack Selinux support, I'm looking at you RHEL5
|
22
|
+
exec { "chcon -u system_u -r object_r -t postgresql_db_t /tmp/pg_tablespaces":
|
23
|
+
refreshonly => true,
|
24
|
+
path => "/bin:/usr/bin",
|
25
|
+
onlyif => "which chcon",
|
26
|
+
before => File["/tmp/pg_tablespaces/space1", "/tmp/pg_tablespaces/space2"]
|
27
|
+
}
|
28
|
+
|
29
|
+
postgresql::server::tablespace { 'tablespace1':
|
30
|
+
location => '/tmp/pg_tablespaces/space1',
|
31
|
+
}
|
32
|
+
postgresql::server::database { 'tablespacedb1':
|
33
|
+
encoding => 'utf8',
|
34
|
+
tablespace => 'tablespace1',
|
35
|
+
}
|
36
|
+
postgresql::server::db { 'tablespacedb2':
|
37
|
+
user => 'dbuser2',
|
38
|
+
password => postgresql_password('dbuser2', 'dbuser2'),
|
39
|
+
tablespace => 'tablespace1',
|
40
|
+
}
|
41
|
+
|
42
|
+
postgresql::server::role { 'spcuser':
|
43
|
+
password_hash => postgresql_password('spcuser', 'spcuser'),
|
44
|
+
}
|
45
|
+
postgresql::server::tablespace { 'tablespace2':
|
46
|
+
location => '/tmp/pg_tablespaces/space2',
|
47
|
+
owner => 'spcuser',
|
48
|
+
}
|
49
|
+
postgresql::server::database { 'tablespacedb3':
|
50
|
+
encoding => 'utf8',
|
51
|
+
tablespace => 'tablespace2',
|
52
|
+
}
|
53
|
+
EOS
|
54
|
+
|
55
|
+
puppet_apply(pp) do |r|
|
56
|
+
r.exit_code.should_not == 1
|
57
|
+
r.refresh
|
58
|
+
r.exit_code.should == 0
|
59
|
+
end
|
60
|
+
|
61
|
+
# Check that databases use correct tablespaces
|
62
|
+
psql('--command="select ts.spcname from pg_database db, pg_tablespace ts where db.dattablespace = ts.oid and db.datname = \'"\'tablespacedb1\'"\'"') do |r|
|
63
|
+
r.stdout.should =~ /tablespace1/
|
64
|
+
r.stderr.should == ''
|
65
|
+
r.exit_code.should == 0
|
66
|
+
end
|
67
|
+
|
68
|
+
psql('--command="select ts.spcname from pg_database db, pg_tablespace ts where db.dattablespace = ts.oid and db.datname = \'"\'tablespacedb3\'"\'"') do |r|
|
69
|
+
r.stdout.should =~ /tablespace2/
|
70
|
+
r.stderr.should == ''
|
71
|
+
r.exit_code.should == 0
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,217 @@
|
|
1
|
+
require 'spec_helper_system'
|
2
|
+
|
3
|
+
describe 'server:' do
|
4
|
+
after :all do
|
5
|
+
# Cleanup after tests have ran
|
6
|
+
puppet_apply("class { 'postgresql::server': ensure => absent }") do |r|
|
7
|
+
r.exit_code.should_not == 1
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'test loading class with no parameters' do
|
12
|
+
pp = <<-EOS.unindent
|
13
|
+
class { 'postgresql::server': }
|
14
|
+
EOS
|
15
|
+
|
16
|
+
puppet_apply(pp) do |r|
|
17
|
+
r.exit_code.should == 2
|
18
|
+
r.refresh
|
19
|
+
r.exit_code.should == 0
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe port(5432) do
|
24
|
+
it { should be_listening }
|
25
|
+
end
|
26
|
+
|
27
|
+
describe 'setting postgres password' do
|
28
|
+
it 'should install and successfully adjust the password' do
|
29
|
+
pp = <<-EOS.unindent
|
30
|
+
class { 'postgresql::server':
|
31
|
+
postgres_password => 'foobarbaz',
|
32
|
+
ip_mask_deny_postgres_user => '0.0.0.0/32',
|
33
|
+
}
|
34
|
+
EOS
|
35
|
+
|
36
|
+
puppet_apply(pp) do |r|
|
37
|
+
[0,2].should include(r.exit_code)
|
38
|
+
r.stdout.should =~ /\[set_postgres_postgrespw\]\/returns: executed successfully/
|
39
|
+
r.refresh
|
40
|
+
r.exit_code.should == 0
|
41
|
+
end
|
42
|
+
|
43
|
+
pp = <<-EOS.unindent
|
44
|
+
class { 'postgresql::server':
|
45
|
+
postgres_password => 'TPSR$$eports!',
|
46
|
+
ip_mask_deny_postgres_user => '0.0.0.0/32',
|
47
|
+
}
|
48
|
+
EOS
|
49
|
+
|
50
|
+
puppet_apply(pp) do |r|
|
51
|
+
[0,2].should include(r.exit_code)
|
52
|
+
r.stdout.should =~ /\[set_postgres_postgrespw\]\/returns: executed successfully/
|
53
|
+
r.refresh
|
54
|
+
r.exit_code.should == 0
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
describe 'server without defaults:' do
|
62
|
+
before :all do
|
63
|
+
puppet_apply(<<-EOS.unindent)
|
64
|
+
if($::operatingsystem =~ /Debian|Ubuntu/) {
|
65
|
+
# Need to make sure the correct utf8 locale is ready for our
|
66
|
+
# non-standard tests
|
67
|
+
file { '/etc/locale.gen':
|
68
|
+
content => "en_US ISO-8859-1\nen_NG UTF-8\nen_US UTF-8\n",
|
69
|
+
}~>
|
70
|
+
exec { '/usr/sbin/locale-gen':
|
71
|
+
logoutput => true,
|
72
|
+
refreshonly => true,
|
73
|
+
}
|
74
|
+
}
|
75
|
+
EOS
|
76
|
+
end
|
77
|
+
|
78
|
+
context 'test installing non-default version of postgresql' do
|
79
|
+
after :all do
|
80
|
+
psql('--command="drop database postgresql_test_db" postgres')
|
81
|
+
pp = <<-EOS.unindent
|
82
|
+
class { 'postgresql::globals':
|
83
|
+
ensure => absent,
|
84
|
+
manage_package_repo => true,
|
85
|
+
version => '9.3',
|
86
|
+
}
|
87
|
+
class { 'postgresql::server':
|
88
|
+
ensure => absent,
|
89
|
+
}
|
90
|
+
EOS
|
91
|
+
puppet_apply(pp) do |r|
|
92
|
+
r.exit_code.should_not == 1
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
it 'perform installation and create a db' do
|
97
|
+
pp = <<-EOS.unindent
|
98
|
+
class { "postgresql::globals":
|
99
|
+
version => "9.3",
|
100
|
+
manage_package_repo => true,
|
101
|
+
encoding => 'UTF8',
|
102
|
+
locale => 'en_US.UTF-8',
|
103
|
+
}
|
104
|
+
class { "postgresql::server": }
|
105
|
+
postgresql::server::db { "postgresql_test_db":
|
106
|
+
user => "foo1",
|
107
|
+
password => postgresql_password('foo1', 'foo1'),
|
108
|
+
}
|
109
|
+
postgresql::server::config_entry { 'port':
|
110
|
+
value => '5432',
|
111
|
+
}
|
112
|
+
EOS
|
113
|
+
|
114
|
+
puppet_apply(pp) do |r|
|
115
|
+
r.exit_code.should == 2
|
116
|
+
r.refresh
|
117
|
+
r.exit_code.should == 0
|
118
|
+
end
|
119
|
+
|
120
|
+
psql('postgresql_test_db --command="select datname from pg_database limit 1"') do |r|
|
121
|
+
r.exit_code.should == 0
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
describe port(5432) do
|
126
|
+
it { should be_listening }
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
unless ((node.facts['osfamily'] == 'RedHat' and node.facts['lsbmajdistrelease'] == '5') ||
|
131
|
+
node.facts['osfamily'] == 'Debian')
|
132
|
+
|
133
|
+
context 'override locale and encoding' do
|
134
|
+
after :each do
|
135
|
+
puppet_apply "class { 'postgresql::server': ensure => absent }" do |r|
|
136
|
+
r.exit_code.should_not == 1
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
it 'perform installation with different locale and encoding' do
|
141
|
+
pp = <<-EOS.unindent
|
142
|
+
class { 'postgresql::server':
|
143
|
+
locale => 'en_NG',
|
144
|
+
encoding => 'UTF8',
|
145
|
+
}
|
146
|
+
EOS
|
147
|
+
|
148
|
+
puppet_apply(pp) do |r|
|
149
|
+
r.exit_code.should == 2
|
150
|
+
r.refresh
|
151
|
+
r.exit_code.should == 0
|
152
|
+
end
|
153
|
+
|
154
|
+
# Remove db first, if it exists for some reason
|
155
|
+
shell('su postgres -c "dropdb test1"')
|
156
|
+
shell('su postgres -c "createdb test1"')
|
157
|
+
shell('su postgres -c \'psql -c "show lc_ctype" test1\'') do |r|
|
158
|
+
r.stdout.should =~ /en_NG/
|
159
|
+
end
|
160
|
+
|
161
|
+
shell('su postgres -c \'psql -c "show lc_collate" test1\'') do |r|
|
162
|
+
r.stdout.should =~ /en_NG/
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
describe 'server with firewall:' do
|
170
|
+
after :all do
|
171
|
+
puppet_apply("class { 'postgresql::server': ensure => absent }") do |r|
|
172
|
+
r.exit_code.should_not == 1
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
context 'test installing postgresql with firewall management on' do
|
177
|
+
it 'perform installation and make sure it is idempotent' do
|
178
|
+
pending('no support for firewall with fedora', :if => (node.facts['operatingsystem'] == 'Fedora'))
|
179
|
+
pp = <<-EOS.unindent
|
180
|
+
class { 'firewall': }
|
181
|
+
class { "postgresql::server":
|
182
|
+
manage_firewall => true,
|
183
|
+
}
|
184
|
+
EOS
|
185
|
+
|
186
|
+
puppet_apply(pp) do |r|
|
187
|
+
r.exit_code.should == 2
|
188
|
+
r.refresh
|
189
|
+
r.exit_code.should == 0
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
describe 'server without pg_hba.conf:' do
|
196
|
+
after :all do
|
197
|
+
puppet_apply("class { 'postgresql::server': ensure => absent }") do |r|
|
198
|
+
r.exit_code.should_not == 1
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
context 'test installing postgresql without pg_hba.conf management on' do
|
203
|
+
it 'perform installation and make sure it is idempotent' do
|
204
|
+
pp = <<-EOS.unindent
|
205
|
+
class { "postgresql::server":
|
206
|
+
manage_pg_hba_conf => false,
|
207
|
+
}
|
208
|
+
EOS
|
209
|
+
|
210
|
+
puppet_apply(pp) do |r|
|
211
|
+
r.exit_code.should == 2
|
212
|
+
r.refresh
|
213
|
+
r.exit_code.should == 0
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
require 'spec_helper_system'
|
2
|
+
|
3
|
+
describe 'postgresql::validate_db_connection:' do
|
4
|
+
before :all do
|
5
|
+
# Setup postgresql server and a sample database for tests to use.
|
6
|
+
pp = <<-EOS.unindent
|
7
|
+
$db = 'foo'
|
8
|
+
class { 'postgresql::server': }
|
9
|
+
|
10
|
+
postgresql::server::db { $db:
|
11
|
+
user => $db,
|
12
|
+
password => postgresql_password($db, $db),
|
13
|
+
}
|
14
|
+
EOS
|
15
|
+
|
16
|
+
puppet_apply(pp) do |r|
|
17
|
+
r.exit_code.should_not == 1
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
after :all do
|
22
|
+
# Remove postgresql server after all tests have ran.
|
23
|
+
puppet_apply("class { 'postgresql::server': ensure => absent }") do |r|
|
24
|
+
r.exit_code.should_not == 1
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'should run puppet with no changes declared if socket connectivity works' do
|
29
|
+
pp = <<-EOS.unindent
|
30
|
+
postgresql::validate_db_connection { 'foo':
|
31
|
+
database_name => 'foo',
|
32
|
+
run_as => 'postgres',
|
33
|
+
}
|
34
|
+
EOS
|
35
|
+
|
36
|
+
puppet_apply(pp) do |r|
|
37
|
+
r.exit_code.should == 0
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'should keep retrying if database is down' do
|
42
|
+
# So first we shut the db down, then background a startup routine with a
|
43
|
+
# sleep 10 in front of it. That way rspec-system should continue while
|
44
|
+
# the pause and db startup happens in the background.
|
45
|
+
shell("/etc/init.d/postgresql* stop")
|
46
|
+
shell('nohup bash -c "sleep 10; /etc/init.d/postgresql* start" > /dev/null 2>&1 &')
|
47
|
+
|
48
|
+
pp = <<-EOS.unindent
|
49
|
+
postgresql::validate_db_connection { 'foo':
|
50
|
+
database_name => 'foo',
|
51
|
+
tries => 30,
|
52
|
+
sleep => 1,
|
53
|
+
run_as => 'postgres',
|
54
|
+
}
|
55
|
+
EOS
|
56
|
+
|
57
|
+
puppet_apply(pp) do |r|
|
58
|
+
r.exit_code.should == 0
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'should run puppet with no changes declared if db ip connectivity works' do
|
63
|
+
pp = <<-EOS.unindent
|
64
|
+
postgresql::validate_db_connection { 'foo':
|
65
|
+
database_host => 'localhost',
|
66
|
+
database_name => 'foo',
|
67
|
+
database_username => 'foo',
|
68
|
+
database_password => 'foo',
|
69
|
+
}
|
70
|
+
EOS
|
71
|
+
|
72
|
+
puppet_apply(pp) do |r|
|
73
|
+
r.exit_code.should == 0
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'should fail catalogue if database connectivity fails' do
|
78
|
+
pp = <<-EOS.unindent
|
79
|
+
postgresql::validate_db_connection { 'foobarbaz':
|
80
|
+
database_host => 'localhost',
|
81
|
+
database_name => 'foobarbaz',
|
82
|
+
database_username => 'foobarbaz',
|
83
|
+
database_password => 'foobarbaz',
|
84
|
+
}
|
85
|
+
EOS
|
86
|
+
|
87
|
+
puppet_apply(pp) do |r|
|
88
|
+
r.exit_code.should == 4
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -3,9 +3,34 @@ require 'spec_helper'
|
|
3
3
|
describe 'postgresql::client', :type => :class do
|
4
4
|
let :facts do
|
5
5
|
{
|
6
|
-
:postgres_default_version => '8.4',
|
7
6
|
:osfamily => 'Debian',
|
7
|
+
:operatingsystem => 'Debian',
|
8
|
+
:operatingsystemrelease => '6.0',
|
8
9
|
}
|
9
10
|
end
|
10
|
-
|
11
|
+
|
12
|
+
describe 'with parameters' do
|
13
|
+
let :params do
|
14
|
+
{
|
15
|
+
:package_ensure => 'absent',
|
16
|
+
:package_name => 'mypackage',
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'should modify package' do
|
21
|
+
should contain_package("postgresql-client").with({
|
22
|
+
:ensure => 'absent',
|
23
|
+
:name => 'mypackage',
|
24
|
+
:tag => 'postgresql',
|
25
|
+
})
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'with no parameters' do
|
30
|
+
it 'should create package with postgresql tag' do
|
31
|
+
should contain_package('postgresql-client').with({
|
32
|
+
:tag => 'postgresql',
|
33
|
+
})
|
34
|
+
end
|
35
|
+
end
|
11
36
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'postgresql::globals', :type => :class do
|
4
|
+
let :facts do
|
5
|
+
{
|
6
|
+
:osfamily => 'Debian',
|
7
|
+
:operatingsystem => 'Debian',
|
8
|
+
:operatingsystemrelease => '6.0',
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'with no parameters' do
|
13
|
+
it 'should work' do
|
14
|
+
should include_class("postgresql::globals")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe 'manage_package_repo => true' do
|
19
|
+
let(:params) do
|
20
|
+
{
|
21
|
+
:manage_package_repo => true,
|
22
|
+
}
|
23
|
+
end
|
24
|
+
it 'should pull in class postgresql::repo' do
|
25
|
+
should include_class("postgresql::repo")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'postgresql::lib::devel', :type => :class do
|
4
|
+
let :facts do
|
5
|
+
{
|
6
|
+
:osfamily => 'Debian',
|
7
|
+
:operatingsystem => 'Debian',
|
8
|
+
:operatingsystemrelease => '6.0',
|
9
|
+
}
|
10
|
+
end
|
11
|
+
it { should include_class("postgresql::lib::devel") }
|
12
|
+
end
|
@@ -1,11 +1,12 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe 'postgresql::java', :type => :class do
|
3
|
+
describe 'postgresql::lib::java', :type => :class do
|
4
4
|
|
5
5
|
describe 'on a debian based os' do
|
6
6
|
let :facts do {
|
7
|
-
:osfamily
|
8
|
-
:
|
7
|
+
:osfamily => 'Debian',
|
8
|
+
:operatingsystem => 'Debian',
|
9
|
+
:operatingsystemrelease => '6.0',
|
9
10
|
}
|
10
11
|
end
|
11
12
|
it { should contain_package('postgresql-jdbc').with(
|
@@ -16,12 +17,13 @@ describe 'postgresql::java', :type => :class do
|
|
16
17
|
|
17
18
|
describe 'on a redhat based os' do
|
18
19
|
let :facts do {
|
19
|
-
:osfamily
|
20
|
-
:
|
20
|
+
:osfamily => 'RedHat',
|
21
|
+
:operatingsystem => 'RedHat',
|
22
|
+
:operatingsystemrelease => '6.4',
|
21
23
|
}
|
22
24
|
end
|
23
25
|
it { should contain_package('postgresql-jdbc').with(
|
24
|
-
:name
|
26
|
+
:name => 'postgresql-jdbc',
|
25
27
|
:ensure => 'present'
|
26
28
|
)}
|
27
29
|
describe 'when parameters are supplied' do
|
@@ -29,22 +31,10 @@ describe 'postgresql::java', :type => :class do
|
|
29
31
|
{:package_ensure => 'latest', :package_name => 'somepackage'}
|
30
32
|
end
|
31
33
|
it { should contain_package('postgresql-jdbc').with(
|
32
|
-
:name
|
34
|
+
:name => 'somepackage',
|
33
35
|
:ensure => 'latest'
|
34
36
|
)}
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
38
|
-
describe 'on any other os' do
|
39
|
-
let :facts do {
|
40
|
-
:osfamily => 'foo',
|
41
|
-
:postgres_default_version => 'foo',
|
42
|
-
}
|
43
|
-
end
|
44
|
-
|
45
|
-
it 'should fail without all the necessary parameters' do
|
46
|
-
expect { subject }.to raise_error(/Module postgresql does not provide defaults for osfamily: foo/)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
40
|
end
|