File tree 2 files changed +35
-0
lines changed
2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,35 @@ class { 'mysql::server':
51
51
it_behaves_like "a idempotent resource"
52
52
end
53
53
54
+ describe 'minimal config' do
55
+ before ( :all ) do
56
+ @tmpdir = default . tmpdir ( 'mysql' )
57
+ end
58
+ let ( :pp ) do
59
+ <<-EOS
60
+ class { 'mysql::server':
61
+ config_file => '#{ @tmpdir } /my.cnf',
62
+ includedir => '#{ @tmpdir } /include',
63
+ manage_config_file => 'false',
64
+ override_options => { 'mysqld' => { 'key_buffer_size' => '32M' }},
65
+ package_ensure => 'present',
66
+ purge_conf_dir => 'false',
67
+ remove_default_accounts => 'false',
68
+ restart => 'false',
69
+ root_group => 'root',
70
+ root_password => 'test',
71
+ service_enabled => 'false',
72
+ service_manage => 'false',
73
+ users => {},
74
+ grants => {},
75
+ databases => {},
76
+ }
77
+ EOS
78
+ end
79
+
80
+ it_behaves_like "a idempotent resource"
81
+ end
82
+
54
83
describe 'syslog configuration' do
55
84
let ( :pp ) do
56
85
<<-EOS
Original file line number Diff line number Diff line change 27
27
it { is_expected . to compile . with_all_deps }
28
28
end
29
29
30
+ context 'when not managing the service' do
31
+ let ( :params ) { { :service_manage => false } }
32
+ it { is_expected . to compile . with_all_deps }
33
+ it { is_expected . not_to contain_service ( 'mysqld' ) }
34
+ end
35
+
30
36
context 'mysql::server::install' do
31
37
it 'contains the package by default' do
32
38
is_expected . to contain_package ( 'mysql-server' ) . with ( {
You can’t perform that action at this time.
0 commit comments