diff --git a/spec/classes/role/development_spec.rb b/spec/classes/role/development_spec.rb index c9ffc40c..31c4dc64 100644 --- a/spec/classes/role/development_spec.rb +++ b/spec/classes/role/development_spec.rb @@ -17,7 +17,7 @@ end # Comment out to display all available resources easily - #it { pp catalogue.resources } + # it { pp catalogue.resources } it { is_expected.to compile.with_all_deps } end diff --git a/spec/classes/role/domain_controller_spec.rb b/spec/classes/role/domain_controller_spec.rb index ae4d9d2f..2dc7dd7d 100644 --- a/spec/classes/role/domain_controller_spec.rb +++ b/spec/classes/role/domain_controller_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe 'role::domain_controller' do - on_supported_os.each do |os, os_facts| next unless os_facts[:osfamily] == 'Debian' diff --git a/spec/spec_helper_local.rb b/spec/spec_helper_local.rb index 341d7590..d7d33ad0 100644 --- a/spec/spec_helper_local.rb +++ b/spec/spec_helper_local.rb @@ -1,38 +1,2 @@ # require 'rspec/mocks' require 'rspec-puppet-utils' -# def puppetdb_query(_return_vaue) -# # Puppet::Parser::Functions.newfunction(:puppetdb_query, type: :rvalue) do |_args| -# # return[{ 'key' => 'fqdn', 'value' => 'certname.example.com' }] -# # end -# MockFunction.new('puppetdb_query') do |f| -# f.stub(:call).with([['from', 'resources', -# ['and', ['=', 'type', 'Zabbix_template_host'], ['=', ['parameter', 'ensure'], 'present'], ['~', 'title', '.*@unittest.theclarkhome.com']]]]).returns([{ 'title' => 'fqdn', -# 'value' => 'certname.example.com' }]) -# end -# end -# let!(:puppetdb_query) do -# MockFunction.new('puppetdb_query') do |f| -# # Everything that runs puppetdb_query should be able to deal -# # with empty results. -# f.stubbed.returns([]) -# end - -# $LOAD_PATH.push(File.join(fixture_path, 'modules', 'puppetdb','puppet', 'lib')) -# $LOAD_PATH.push(File.join(fixture_path, 'modules', 'puppetdbquery','lib')) -# -#RSpec.configure do |config| -# # config.trusted_server_facts = true # removed for puppet6! -# config.default_trusted_facts = true -# config.before(:each) do -## @before_each = MockFunction.new('puppetdb_query'){ |f| -## f.stubs(:call).with([['from', 'resources', ['and', ['=', 'type', 'Zabbix_template_host'], ['=', ['parameter', 'ensure'], 'present'], ['~', 'title', '.*@unittest.theclarkhome.com']] -## ]]).returns([{ 'title' => 'fqdn', 'value' => 'certname.example.com' }]) -## } -## #@before_each = Puppet::Parser::Functions.newfunction(:puppetdb_query, :type => :rvalue) { |args| [ [{ 'title': 'fqdn' }] ] } -## #@before_each = puppetdb_query('query string') -# # @before_each = "function puppetdb_query($string) { return [{ 'title': 'fqdn' }] }" -# @before_each = 'function puppetdb_query($string) { return [{ title => "fqdn", value => "certname.example.com" }] }' -# end -#end -# -#