Skip to content

Commit bdd521a

Browse files
committed
autocorrect rubocop
1 parent 3c38355 commit bdd521a

File tree

7 files changed

+67
-47
lines changed

7 files changed

+67
-47
lines changed

spec/acceptance/mysql_db_spec.rb

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,25 @@ class { 'mysql::server': override_options => { 'root_password' => 'password' } }
4545
end
4646
end
4747

48-
describe 'creating a database with dbname parameter' do
49-
let(:check_command) { ' | grep realdb' }
50-
let(:pp) do
51-
<<-MANIFEST
52-
class { 'mysql::server': override_options => { 'root_password' => 'password' } }
53-
mysql::db { 'spec1':
54-
user => 'root1',
55-
password => 'password',
56-
dbname => 'realdb',
57-
}
58-
MANIFEST
59-
end
48+
# covered by units
49+
# describe 'creating a database with dbname parameter' do
50+
# let(:check_command) { ' | grep realdb' }
51+
# let(:pp) do
52+
# <<-MANIFEST
53+
# class { 'mysql::server': override_options => { 'root_password' => 'password' } }
54+
# mysql::db { 'spec1':
55+
# user => 'root1',
56+
# password => 'password',
57+
# dbname => 'realdb',
58+
# }
59+
# MANIFEST
60+
# end
6061

61-
it_behaves_like 'a idempotent resource'
62+
# it_behaves_like 'a idempotent resource'
6263

63-
describe command("mysql -e 'show databases;'") do
64-
its(:exit_status) { is_expected.to eq 0 }
65-
its(:stdout) { is_expected.to match %r{^realdb$} }
66-
end
67-
end
64+
# describe command("mysql -e 'show databases;'") do
65+
# its(:exit_status) { is_expected.to eq 0 }
66+
# its(:stdout) { is_expected.to match %r{^realdb$} }
67+
# end
68+
# end
6869
end

spec/acceptance/nodesets/test.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,37 @@
1+
#---
2+
#HOSTS:
3+
# centos6-64-1:
4+
# pe_dir:
5+
# pe_ver:
6+
# pe_upgrade_dir:
7+
# pe_upgrade_ver:
8+
# hypervisor: vmpooler
9+
# platform: el-6-x86_64
10+
# packaging_platform: el-6-x86_64
11+
# template: centos-6-x86_64
12+
# roles:
13+
# - agent
14+
# - default
15+
#CONFIG:
16+
# nfs_server: none
17+
# consoleport: 443
18+
# pooling_api: http://vmpooler.delivery.puppetlabs.net/
19+
#
120
---
221
HOSTS:
3-
centos6-64-1:
22+
debian9-64-1:
423
pe_dir:
524
pe_ver:
625
pe_upgrade_dir:
726
pe_upgrade_ver:
827
hypervisor: vmpooler
9-
platform: el-6-x86_64
10-
packaging_platform: el-6-x86_64
11-
template: centos-6-x86_64
28+
platform: debian-9-amd64
29+
packaging_platform: debian-9-amd64
30+
template: debian-9-x86_64
1231
roles:
1332
- agent
1433
- default
1534
CONFIG:
1635
nfs_server: none
1736
consoleport: 443
1837
pooling_api: http://vmpooler.delivery.puppetlabs.net/
19-

spec/defines/mysql_db_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
it 'subscribes to database if sql script is given' do
2323
params['sql'] = 'test_sql'
24+
is_expected.to contain_mysql_database('test_db')
2425
is_expected.to contain_exec('test_db-import').with_subscribe('Mysql_database[test_db]')
2526
end
2627

@@ -31,9 +32,9 @@
3132

3233
it 'imports sql script on creation' do
3334
params.merge!('sql' => 'test_sql', 'enforce_sql' => true)
34-
#' if enforcing #refreshonly'
35+
# ' if enforcing #refreshonly'
3536
is_expected.to contain_exec('test_db-import').with_refreshonly(false)
36-
#'if enforcing #command'
37+
# 'if enforcing #command'
3738
is_expected.to contain_exec('test_db-import').with_command('cat test_sql | mysql test_db')
3839
end
3940
# it 'imports sql script on creation if enforcing #command' do

spec/spec_helper_acceptance.rb

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,25 @@ def idempotent_apply(hosts, manifest, opts = {}, &block)
4444
c.before :suite do
4545
run_puppet_access_login(user: 'admin') if pe_install? && (Gem::Version.new(puppet_version) >= Gem::Version.new('5.0.0'))
4646
# hosts.each do |host|
47-
# # This will be removed, this is temporary to test localisation.
48-
# if (fact('osfamily') == 'Debian' || fact('osfamily') == 'RedHat') &&
49-
# (Gem::Version.new(puppet_version) >= Gem::Version.new('4.10.5') &&
50-
# Gem::Version.new(puppet_version) < Gem::Version.new('5.2.0'))
51-
# on(host, 'mkdir /opt/puppetlabs/puppet/share/locale/ja')
52-
# on(host, 'touch /opt/puppetlabs/puppet/share/locale/ja/puppet.po')
53-
# end
54-
# if fact('osfamily') == 'Debian'
55-
# # install language on debian systems
56-
# install_language_on(host, 'ja_JP.utf-8') if not_controller(host)
57-
# # This will be removed, this is temporary to test localisation.
58-
# end
59-
# # Required for binding tests.
60-
# if fact('osfamily') == 'RedHat'
61-
# if fact('operatingsystemmajrelease') =~ %r{7} || fact('operatingsystem') =~ %r{Fedora}
62-
# shell('yum install -y bzip2')
63-
# end
64-
# end
65-
# on host, puppet('module', 'install', 'stahnma/epel')
47+
# # This will be removed, this is temporary to test localisation.
48+
# if (fact('osfamily') == 'Debian' || fact('osfamily') == 'RedHat') &&
49+
# (Gem::Version.new(puppet_version) >= Gem::Version.new('4.10.5') &&
50+
# Gem::Version.new(puppet_version) < Gem::Version.new('5.2.0'))
51+
# on(host, 'mkdir /opt/puppetlabs/puppet/share/locale/ja')
52+
# on(host, 'touch /opt/puppetlabs/puppet/share/locale/ja/puppet.po')
53+
# end
54+
# if fact('osfamily') == 'Debian'
55+
# # install language on debian systems
56+
# install_language_on(host, 'ja_JP.utf-8') if not_controller(host)
57+
# # This will be removed, this is temporary to test localisation.
58+
# end
59+
# # Required for binding tests.
60+
# if fact('osfamily') == 'RedHat'
61+
# if fact('operatingsystemmajrelease') =~ %r{7} || fact('operatingsystem') =~ %r{Fedora}
62+
# shell('yum install -y bzip2')
63+
# end
64+
# end
65+
# on host, puppet('module', 'install', 'stahnma/epel')
6666
# end
6767
end
6868
end

spec/spec_helper_local.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
require 'codecov'
88

99
SimpleCov.formatters = [
10-
SimpleCov::Formatter::HTMLFormatter,
11-
SimpleCov::Formatter::Console,
12-
SimpleCov::Formatter::Codecov,
10+
SimpleCov::Formatter::HTMLFormatter,
11+
SimpleCov::Formatter::Console,
12+
SimpleCov::Formatter::Codecov,
1313
]
1414
SimpleCov.start do
1515
track_files 'lib/**/*.rb'

0 commit comments

Comments
 (0)