Skip to content

Commit

Permalink
Fix rubcop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mergwyn committed Dec 30, 2024
1 parent 8e66a3f commit eb25e40
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 38 deletions.
2 changes: 1 addition & 1 deletion spec/classes/role/development_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion spec/classes/role/domain_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
36 changes: 0 additions & 36 deletions spec/spec_helper_local.rb
Original file line number Diff line number Diff line change
@@ -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
#
#

0 comments on commit eb25e40

Please sign in to comment.