Skip to content

Commit 3c38355

Browse files
committed
updated mysql_db_spec
1 parent 4a15544 commit 3c38355

File tree

2 files changed

+19
-30
lines changed

2 files changed

+19
-30
lines changed

spec/acceptance/nodesets/test.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,4 @@ CONFIG:
1616
nfs_server: none
1717
consoleport: 443
1818
pooling_api: http://vmpooler.delivery.puppetlabs.net/
19-
#
20-
#---
21-
#HOSTS:
22-
# redhat5-64-1:
23-
# pe_dir:
24-
# pe_ver:
25-
# pe_upgrade_dir:
26-
# pe_upgrade_ver:
27-
# hypervisor: vmpooler
28-
# platform: el-5-x86_64
29-
# packaging_platform: el-5-x86_64
30-
# template: redhat-5-x86_64
31-
# roles:
32-
# - agent
33-
# - default
34-
#CONFIG:
35-
# nfs_server: none
36-
# consoleport: 443
37-
# pooling_api: http://vmpooler.delivery.puppetlabs.net/
19+

spec/defines/mysql_db_spec.rb

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,29 @@
2929
is_expected.to contain_exec('test_db-import').with_refreshonly(true)
3030
end
3131

32-
it 'imports sql script on creation if enforcing #refreshonly' do
32+
it 'imports sql script on creation' do
3333
params.merge!('sql' => 'test_sql', 'enforce_sql' => true)
34+
#' if enforcing #refreshonly'
3435
is_expected.to contain_exec('test_db-import').with_refreshonly(false)
35-
end
36-
it 'imports sql script on creation if enforcing #command' do
37-
params.merge!('sql' => 'test_sql', 'enforce_sql' => true)
36+
#'if enforcing #command'
3837
is_expected.to contain_exec('test_db-import').with_command('cat test_sql | mysql test_db')
3938
end
39+
# it 'imports sql script on creation if enforcing #command' do
40+
# params.merge!('sql' => 'test_sql', 'enforce_sql' => true)
41+
# is_expected.to contain_exec('test_db-import').with_command('cat test_sql | mysql test_db')
42+
# end
4043

41-
it 'imports sql script with custom command on creation if enforcing #refreshonly' do
44+
it 'imports sql script with custom command on creation ' do
4245
params.merge!('sql' => 'test_sql', 'enforce_sql' => true, 'import_cat_cmd' => 'zcat')
46+
# if enforcing #refreshonly
4347
is_expected.to contain_exec('test_db-import').with_refreshonly(false)
44-
end
45-
it 'imports sql script with custom command on creation if enforcing #command' do
46-
params.merge!('sql' => 'test_sql', 'enforce_sql' => true, 'import_cat_cmd' => 'zcat')
48+
# if enforcing #command
4749
is_expected.to contain_exec('test_db-import').with_command('zcat test_sql | mysql test_db')
4850
end
51+
# it 'imports sql script with custom command on creation if enforcing #command' do
52+
# params.merge!('sql' => 'test_sql', 'enforce_sql' => true, 'import_cat_cmd' => 'zcat')
53+
# is_expected.to contain_exec('test_db-import').with_command('zcat test_sql | mysql test_db')
54+
# end
4955

5056
it 'imports sql scripts when more than one is specified' do
5157
params['sql'] = ['test_sql', 'test_2_sql']
@@ -55,11 +61,12 @@
5561
it 'does not create database' do
5662
params.merge!('ensure' => 'absent', 'host' => 'localhost')
5763
is_expected.to contain_mysql_database('test_db').with_ensure('absent')
58-
end
59-
it 'does not create database user' do
60-
params.merge!('ensure' => 'absent', 'host' => 'localhost')
6164
is_expected.to contain_mysql_user('testuser@localhost').with_ensure('absent')
6265
end
66+
# it 'does not create database user' do
67+
# params.merge!('ensure' => 'absent', 'host' => 'localhost')
68+
# is_expected.to contain_mysql_user('testuser@localhost').with_ensure('absent')
69+
# end
6370

6471
it 'creates with an appropriate collate and charset' do
6572
params.merge!('charset' => 'utf8', 'collate' => 'utf8_danish_ci')

0 commit comments

Comments
 (0)