|
29 | 29 | is_expected.to contain_exec('test_db-import').with_refreshonly(true)
|
30 | 30 | end
|
31 | 31 |
|
32 |
| - it 'imports sql script on creation if enforcing #refreshonly' do |
| 32 | + it 'imports sql script on creation' do |
33 | 33 | params.merge!('sql' => 'test_sql', 'enforce_sql' => true)
|
| 34 | + #' if enforcing #refreshonly' |
34 | 35 | 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' |
38 | 37 | is_expected.to contain_exec('test_db-import').with_command('cat test_sql | mysql test_db')
|
39 | 38 | 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 |
40 | 43 |
|
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 |
42 | 45 | params.merge!('sql' => 'test_sql', 'enforce_sql' => true, 'import_cat_cmd' => 'zcat')
|
| 46 | + # if enforcing #refreshonly |
43 | 47 | 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 |
47 | 49 | is_expected.to contain_exec('test_db-import').with_command('zcat test_sql | mysql test_db')
|
48 | 50 | 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 |
49 | 55 |
|
50 | 56 | it 'imports sql scripts when more than one is specified' do
|
51 | 57 | params['sql'] = ['test_sql', 'test_2_sql']
|
|
55 | 61 | it 'does not create database' do
|
56 | 62 | params.merge!('ensure' => 'absent', 'host' => 'localhost')
|
57 | 63 | 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') |
61 | 64 | is_expected.to contain_mysql_user('testuser@localhost').with_ensure('absent')
|
62 | 65 | 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 |
63 | 70 |
|
64 | 71 | it 'creates with an appropriate collate and charset' do
|
65 | 72 | params.merge!('charset' => 'utf8', 'collate' => 'utf8_danish_ci')
|
|
0 commit comments