diff --git a/.sync.yml b/.sync.yml index b7aa1ef..a9201b5 100644 --- a/.sync.yml +++ b/.sync.yml @@ -1,7 +1,7 @@ --- Rakefile: - linter_options: - - no-140chars-check + extra_disabled_lint_checks: + - 140chars spec/spec_helper.rb: hiera_config: spec/fixtures/hiera.yaml diff --git a/Rakefile b/Rakefile index 2d9df93..6329e75 100644 --- a/Rakefile +++ b/Rakefile @@ -7,4 +7,4 @@ require 'puppet-syntax/tasks/puppet-syntax' require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings' PuppetLint.configuration.send('disable_relative') -PuppetLint.configuration.send('no-140chars-check') +PuppetLint.configuration.send('disable_140chars') diff --git a/spec/acceptance/galera_codership_spec.rb b/spec/acceptance/galera_codership_spec.rb index 4a082cb..0e39f9c 100644 --- a/spec/acceptance/galera_codership_spec.rb +++ b/spec/acceptance/galera_codership_spec.rb @@ -21,7 +21,7 @@ class { 'galera': deb_sysmaint_password => 'sysmaint', configure_firewall => false, galera_servers => ['127.0.0.1'], - galera_master => $fqdn, + galera_master => $facts['networking']['fqdn'], root_password => 'root_password', status_password => 'status_password', override_options => { diff --git a/spec/classes/galera_debian_spec.rb b/spec/classes/galera_debian_spec.rb index 3d4c873..1faad7e 100644 --- a/spec/classes/galera_debian_spec.rb +++ b/spec/classes/galera_debian_spec.rb @@ -30,7 +30,7 @@ context 'when this node is the master' do before(:each) do - facts.merge!(fqdn: 'control1') + facts.merge!(networking: { 'fqdn' => 'control1' }) end let(:node) { 'control1' } @@ -69,7 +69,7 @@ context 'when this node is a slave' do before(:each) do - facts.merge!(fqdn: 'slave') + facts.merge!(networking: { 'fqdn' => 'slave' }) end let(:node) { 'slave' } diff --git a/spec/classes/galera_init_spec.rb b/spec/classes/galera_init_spec.rb index 338959a..1008fa5 100644 --- a/spec/classes/galera_init_spec.rb +++ b/spec/classes/galera_init_spec.rb @@ -76,12 +76,12 @@ end context 'when node is the master' do - before(:each) { params.merge!(galera_master: facts[:fqdn]) } + before(:each) { params.merge!(galera_master: facts[:networking]['fqdn']) } it { is_expected.to contain_exec('bootstrap_galera_cluster') } end context 'when node is not the master' do - before(:each) { params.merge!(galera_master: "not_#{facts[:fqdn]}") } + before(:each) { params.merge!(galera_master: "not_#{facts[:networking]['fqdn']}") } it { is_expected.not_to contain_exec('bootstrap_galera_cluster') } end @@ -142,14 +142,14 @@ end context 'when create_root_user=undef (default) and the master' do - before(:each) { params.merge!(galera_master: facts[:fqdn]) } + before(:each) { params.merge!(galera_master: facts[:networking]['fqdn']) } it { is_expected.to contain_class('galera').with(create_root_user: nil) } it { is_expected.to contain_class('mysql::server').with(create_root_user: true) } it { is_expected.to contain_mysql_user('root@localhost') } end context 'when create_root_user=undef (default) and not the master' do - before(:each) { params.merge!(galera_master: "not_#{facts[:fqdn]}") } + before(:each) { params.merge!(galera_master: "not_#{facts[:networking]['fqdn']}") } it { is_expected.to contain_class('mysql::server').with(create_root_user: false) } it { is_expected.not_to contain_mysql_user('root@localhost') } end diff --git a/spec/classes/galera_redhat_spec.rb b/spec/classes/galera_redhat_spec.rb index 0a01d45..2a0721a 100644 --- a/spec/classes/galera_redhat_spec.rb +++ b/spec/classes/galera_redhat_spec.rb @@ -38,7 +38,7 @@ end context 'when node is the master' do - before(:each) { params.merge!(galera_master: facts[:fqdn]) } + before(:each) { params.merge!(galera_master: facts[:networking]['fqdn']) } it { is_expected.to contain_exec('bootstrap_galera_cluster').with_command(%r{systemctl start mysql@bootstrap.service}) } end @@ -52,7 +52,7 @@ shared_examples_for 'galera on RedHat 6' do context 'when node is the master' do - before(:each) { params.merge!(galera_master: facts[:fqdn]) } + before(:each) { params.merge!(galera_master: facts[:networking]['fqdn']) } it { is_expected.to contain_exec('bootstrap_galera_cluster').with_command(%r{/etc/init.d/mysql bootstrap-pxc}) } end end diff --git a/spec/default_facts.yml b/spec/default_facts.yml index a9ef123..d8774cc 100644 --- a/spec/default_facts.yml +++ b/spec/default_facts.yml @@ -6,7 +6,7 @@ networking: ip: "172.16.254.254" ip6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA" mac: "AA:AA:AA:AA:AA:AA" + fqdn: localhost is_pe: false root_home: "/root" -fqdn: localhost